閱讀453 返回首頁    go 魔獸


android 中係統自帶的主題與樣式(theme and style)

android:theme="@android:style/Theme.Dialog" 將一個Activity顯示為能話框模式
android:theme="@android:style/Theme.NoTitleBar" 不顯示應用程序標題欄
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 不顯示應用程序標題欄,並全屏
android:theme="Theme.Light" 背景為白色
android:theme="Theme.Light.NoTitleBar" 白色背景並無標題欄
android:theme="Theme.Light.NoTitleBar.Fullscreen" 白色背景,無標題欄,全屏
android:theme="Theme.Black" 背景黑色
android:theme="Theme.Black.NoTitleBar" 黑色背景並無標題欄
android:theme="Theme.Black.NoTitleBar.Fullscreen" 黑色背景,無標題欄,全屏
android:theme="Theme.Wallpaper" 用係統桌麵為應用程序背景
android:theme="Theme.Wallpaper.NoTitleBar" 用係統桌麵為應用程序背景,且無標題欄
android:theme="Theme.Wallpaper.NoTitleBar.Fullscreen" 用係統桌麵為應用程序背景,無標題欄,全屏
android:theme="Translucent"
android:theme="Theme.Translucent.NoTitleBar"
android:theme="Theme.Translucent.NoTitleBar.Fullscreen"
android:theme="Theme.Panel"

android:theme="Theme.Light.Panel"




android中係統自帶的樣式(style)的集錦:

Android平台定義了三種字體大小。

  1. "?android:attr/textAppearanceLarge"
  2. "?android:attr/textAppearanceMedium"
  3. "?android:attr/textAppearanceSmall"

使用方法:

  1. android:textAppearance="?android:attr/textAppearanceLarge"
  2. android:textAppearance="?android:attr/textAppearanceMedium"
  3. android:textAppearance="?android:attr/textAppearanceSmall"

或者


Android字體顏色

  1. android:textColor="?android:attr/textColorPrimary"
  2. android:textColor="?android:attr/textColorSecondary"
  3. android:textColor="?android:attr/textColorTertiary"
  4. android:textColor="?android:attr/textColorPrimaryInverse"
  5. android:textColor="?android:attr/textColorSecondaryInverse"

AndroidProgressBar


分隔符 橫向:

  1. <View
  2. android:layout_width="fill_parent"
  3. android:layout_height="1dip"
  4. android:background="?android:attr/listDivider" />

分隔符 縱向:

  1. <View android:layout_width="1dip"
  2. android:layout_height="fill_parent"
  3. android:background="?android:attr/listDivider" />
複製代碼

CheckBox



//其它有用的樣式 


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

android:paddingRight="?android:attr/scrollbarSize"





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

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



最後更新:2017-04-02 22:16:39

  上一篇:go 裝Sybase,裝WAS 6.1的時候報錯java.exe-損壞的圖象
  下一篇:go 從iOS應用被拒看蘋果的審核。