Android TabLayout導航條屬性的設定
阿新 • • 發佈:2019-01-10
靜態修改
<android.support.design.widget.TabLayout
android:id="@+id/synthesize_tablayout"
android:layout_width="match_parent"
<!--(1)tab的高度-->
android:layout_height="wrap_content"
<!--(2)背景顏色-->
android:background="#ecebeb"
<!--(3)tab標籤的text初始顏色-->
app:tabTextColor="#8e8d8d"
<!--(4)tab標籤的text選中顏色-->
app:tabSelectedTextColor="#08b110"
<!--(5)索引條的顏色-->
app:tabIndicatorColor="#08b110"
<!--(6)索引條的的高度-->
app:tabIndicatorHeight="15dp"
<!--(7)tab標籤是否水平滑動或者充滿-->
app:tabMode="scrollable(fixed)"
<!--(8)使用系統的風格設定tab標籤的text字型大小-->
app:tabTextAppearance="@android:style/TextAppearance.Holo.Large"/>