File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff 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/
You can’t perform that action at this time.
0 commit comments