gaolonglong / FragmentTabHost

FragmentTabHost + ViewPager实现Android底部Tab,并避免Fragment之间切换时每次都会调用onCreateView方法,导致每次Fragment的布局都重绘。
15 stars 4 forks source link

为什么要加Viewpager? #1

Open TearBack opened 8 years ago

TearBack commented 8 years ago

FragmentTabHost已经实现了选项卡,能够点击切换Fragment,再用ViewPager不是又加了一层,重复了功能?

gaolonglong commented 8 years ago

不使用ViewPager他娘的不能左右滑动呀 还是要根据需求来 比如手机QQ、新浪微博就不能够左右滑动,只能点按;微信支持点击和滑动。

CaiWeiLeGG commented 7 years ago

楼主,为什么这段代码一直没调用 ViewGroup parent = (ViewGroup) mRootView.getParent(); if (parent != null){ parent.removeView(mRootView); Log.e("666","HomeFragment removeView"); }