- 博客(3)
- 资源 (1)
- 收藏
- 关注
原创 Fragment两种添加方式下生命周期调用的区别
Activity onCreate中直接调用两次add,生命周期如下 FragmentTwo会赶上FragmentOne的生命周期同步 FragmentManager fragmentManager = getSupportFragmentManager(); fragmentTransaction = fragmentManager.beginTransaction(); fragmentTransaction.add(R.id.linear, fragmentOne);
2021-04-29 15:39:43
199
原创 Android编程之LayoutInflater的inflate方法详解
ViewGroup mMainContainer = (ViewGroup) LayoutInflater.from(this) .inflate(R.layout.layout, root, attachToRoot); Log.e("Test", "LayoutParams -> " + mMainContainer.getLayoutParams()); Log.e("Test", "Parent -> " + mMainContaine...
2021-03-10 20:20:01
262
原创 Android BottomNavigationView的使用
BottomNavigationView大于3个menu文字和icon都显示代码中设置 public static void disableShiftMode(BottomNavigationView view) { int count = view.getChildCount(); if (count > 0) { BottomN...
2019-01-23 18:38:59
1148
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人