androidx.fragment.app.Fragment.onConfigurationChanged()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(197)

本文整理了Java中androidx.fragment.app.Fragment.onConfigurationChanged()方法的一些代码示例,展示了Fragment.onConfigurationChanged()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fragment.onConfigurationChanged()方法的具体详情如下:
包路径:androidx.fragment.app.Fragment
类名称:Fragment
方法名:onConfigurationChanged

Fragment.onConfigurationChanged介绍

暂无

代码示例

代码示例来源:origin: westnordost/StreetComplete

@Override public void onConfigurationChanged(Configuration newConfig)
{
  super.onConfigurationChanged(newConfig);
  // I need to do everything myself... (AppCompactActivity only does this after calling this
  // method. Genius!)
  getResources().updateConfiguration(newConfig, getResources().getDisplayMetrics());
  bottomSheetBehavior.setPeekHeight(getResources().getDimensionPixelSize(R.dimen.quest_form_peekHeight));
  View bottomSheetContainer = getView().findViewById(R.id.bottomSheetContainer);
  bottomSheetContainer.setBackgroundResource(R.drawable.speechbubbles_gradient_background);
  ViewGroup.LayoutParams params = bottomSheetContainer.getLayoutParams();
  params.width = getResources().getDimensionPixelSize(R.dimen.quest_form_width);
  bottomSheetContainer.setLayoutParams(params);
}

代码示例来源:origin: esafirm/android-image-picker

/**
 * Config recyclerView when configuration changed
 */
@Override
public void onConfigurationChanged(Configuration newConfig) {
  super.onConfigurationChanged(newConfig);
  if (recyclerViewManager != null) {
    // recyclerViewManager can be null here if we use cameraOnly mode
    recyclerViewManager.changeOrientation(newConfig.orientation);
  }
}

代码示例来源:origin: trello/navi

@Override @CallSuper public void onConfigurationChanged(Configuration newConfig) {
 super.onConfigurationChanged(newConfig);
 base.onConfigurationChanged(newConfig);
}

相关文章