本文整理了Java中androidx.fragment.app.Fragment.onConfigurationChanged()
方法的一些代码示例,展示了Fragment.onConfigurationChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Fragment.onConfigurationChanged()
方法的具体详情如下:
包路径:androidx.fragment.app.Fragment
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!