Android預定義樣式

2021-06-21 14:27:18 字數 1200 閱讀 3237

對於能夠顯示文字的控制項(如textview edittext radiobutton button checkbox chronometer等等),你有時需要控制字型的大小。android平台定義了三種字型大小。

使用方法為:

或 android:textcolor="?android:attr/textcolorprimary" 

android:textcolor="?android:attr/textcolorsecondary" 

android:textcolor="?android:attr/textcolortertiary" 

android:textcolor="?android:attr/textcolorprimaryinverse" 

android:textcolor="?android:attr/textcolorsecondaryinverse"

progressbar

style="?android:attr/progressbarstylehorizontal" 

style="?android:attr/progressbarstylelarge" 

style="?android:attr/progressbarstylesmall" 

style="?android:attr/progressbarstylesmalltitle"

分隔符

橫向:縱向: checkbox

style="?android:attr/starstyle"

類似標題欄效果的textview

style="?android:attr/listseparatortextviewstyle"

其它有用的樣式

android:layout_height="?android:attr/listpreferreditemheight"

android:paddingright="?android:attr/scrollbarsize"

style="?android:attr/windowtitlebackgroundstyle"

style="?android:attr/windowtitlestyle"

android:layout_height="?android:attr/windowtitlesize"

android:background="?android:attr/windowbackground"

Android預定義樣式

字型大小 對於能夠顯示文字的控制項 如textview edittext radiobutton button checkbox chronometer等等 你有時需要控制字型的大小。android平台定義了三種字型大小。使用方法為 或 字型顏色 android textcolor android ...

Android預定義樣式

字型大小 對於能夠顯示文字的控制項 如textview edittext radiobutton button checkbox chronometer等等 你有時需要控制字型的大小。android平台定義了三種字型大小。使用方法為 或字型顏色 android textcolor android a...

Android預定義樣式

對於能夠顯示文字的控制項 如textview edittext radiobutton button checkbox chronometer等等 你有時需要控制字型的大小。android平台定義了三種字型大小。使用方法為 或 android textcolor android attr textc...