
Android初学者
冷刀喉前过
菜鸡一枚
展开
-
FragmentManager的使用
FragmentManager的使用 申明fragmentManager 在activity中申明 FragmentManager mFgManager=getFragmentManager(); 或者 FragmentManager mFgManager=getSupportFragmentManager() 在fragment中可以先getActivity() 套娃:在activity中获取其fragment的FragmentManager:getChildFragmentManager()原创 2020-11-02 21:08:40 · 1713 阅读 · 1 评论 -
LayoutInflater.inflate方法学习
LayoutInflater.inflate方法学习 inflate有四个重载方法 1.public View inflate(int ResourceId,ViewGroup root) 2.public View inflate(int ResourceId,ViewGroup root, boolean attachToRoot ) 3.public View inflate(XmlPullParser parser,原创 2020-11-02 21:04:56 · 262 阅读 · 0 评论 -
Android开屏定时跳转实现
Android开屏定时跳转实现 使用布局中的控件的方法 TextView tv_tip = findViewById(R.id.tv_tip); tv_tip.postDelayed(this::jump,500L); *//* 页面逻辑跳转 *//* private void jump() { startActivity(new Intent(this,MainActivity.class)); finish(); } 其中View可取布局文件中任一个控件 每个原创 2020-10-31 17:15:16 · 402 阅读 · 0 评论