http://www.jianshu.com/p/0acc12c29c1b/comments/1402544
http://blog.csdn.net/lwcumt/article/details/46633021
http://www.jb51.net/article/79228.htm
有几个细节问题,1,就是会出现tab切换的时候,tab里面的fragment的头部少一部分,解决方案有两种,第一可以自己写一个view,去代替那一部分。2,就是在中的activity中的布局文件中加上
- android:fitsSystemWindows="true" ,第二种方法可能导致tab的导航栏颜色一样。一样的话也可以解决的,就是用tag(19)的这种方式,tab的位置不同的地方设置不同的颜色,就可以了。
-
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowContentOverlay">@null</item> <item name="colorPrimaryDark">@color/Transparent</item> <item name="android:windowAnimationStyle">@style/AnimationActivity</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentNavigation">false</item> </style> <style name="Theme.AppCompat.Light.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style>
http://www.jianshu.com/p/2a884e211a62