tablayout布局,字体大小
2017-09-18 13:42
344 查看
<android.support.design.widget.TabLayout android:layout_width="match_parent" android:layout_height="50dp" android:id="@+id/tab_layout" app:tabGravity="center" app:tabMode="scrollable" app:tabTextColor="#000000" app:tabTextAppearance="@style/tablayoutTextSize" app:tabSelectedTextColor="#ff0000" app:tabIndicatorColor="#ff0000" > </android.support.design.widget.TabLayout>
设置字体styles.xml里面
<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> <style name="quanping" parent="Theme.AppCompat.Light.NoActionBar"></style> <style name="tablayoutTextSize"> <item name="android:textSize">@dimen/text_20_sp</item> </style> </resources>dimens.xml里面
<resources> <!-- Default screen margins, per the Android Design guidelines. --> <dimen name="activity_horizontal_margin">16dp</dimen> <dimen name="activity_vertical_margin">16dp</dimen> <dimen name="text_20_sp">20sp</dimen> </resources>
相关文章推荐
- tablayout布局,字体大小
- TabLayout设置TabView宽度、下划线宽度和字体大小
- Android中TabLayout切换选项背景和修改字体大小
- android中修改tablayout中的字体大小和颜色
- Android TabLayout 设置Tab 字体大小
- Android Tablayout + viewpager 切换时修改tablayout title(标题)的字体颜色和字体大小
- Android 设置TabLayout背景和字体大小
- Android中TabLayout切换选项背景和修改字体大小
- ECGLayoutConstraint---多屏幕适配,自动计算各种屏幕下的布局以及字体大小
- Android TabLayout 设置间距\字体大小的正确姿势
- Android——可修改字体大小和指示器长度的XTabLayout
- widget.TabLayout 改变字体大小
- android中修改tablayout中的字体大小和颜色
- TabLayout让文字平铺以及改变字体大小
- 修改Android中Layout布局文件字体的大小
- Tablayout 设置字体大小
- Android 中TabLayout如何设置字体大小!
- TabLayout切换选项背景和修改字体大小
- tablayout设置字体大小,分割线,自定义标签
- Android中TabLayout修改字体大小