Skip to content

Commit 2dc02d1

Browse files
committed
add TabLayout
1 parent 3f3e44f commit 2dc02d1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ Android tips
7373
7474
>* 判断手机是不是飞行模式 boolean isEnabled = Settings.System.getInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0) == 1;
7575
76+
>* TabLayout 修改字体的方法
77+
官方的 TabLayout 没有提供修改 TextView size 的方法,可以新建一个 style CustomTabLayoutTextAppearance 继承 TextAppearance.AppCompat.Widget.ActionBar.Title.Inverse ,然后增加 item ,设置 android:textAllCaps 为 true ,再设置 android:textSize 为你想设置的大小。
78+
![](http://ww1.sinaimg.cn/large/640f03afjw1ex0t17aj67j20uk0580uf.jpg)
79+
再在 TabLayout 的布局文件里设置 app:tabTextAppearance="@style/CustomTabLayoutTextAppearance" 即可。
80+
![](http://ww1.sinaimg.cn/large/640f03afjw1ex0t1gub93j20ru0a477q.jpg)
81+
7682
####摘自如下地址:(部分地址)
7783

7884
>* http://oakzmm.com/2015/08/04/cool-Android-api/

0 commit comments

Comments
 (0)