android中內建的主題(theme)的集錦:
- •android:theme="@android:style/Theme.Dialog" 將一個Activity顯示為對話方塊模式
- •android:theme="@android:style/Theme.NoTitleBar" 不顯示應用程式標題欄
- •android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 不顯示應用程式標題欄,並全屏
- •android:theme="@android:style/Theme.Light" 背景為白色
- •android:theme="@android:style/Theme.Light.NoTitleBar" 白色背景並無標題列
- •android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" 白色背景,無標題列,全屏
- •android:theme="@android:style/Theme.Black" 背景黑色
- •android:theme="@android:style/Theme.Black.NoTitleBar" 黑色背景並無標題列
- •android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" 黑色背景,無標題列,全屏
- •android:theme="@android:style/Theme.Wallpaper" 用系統案頭為應用程式背景
- •android:theme="@android:style/Theme.Wallpaper.NoTitleBar" 用系統案頭為應用程式背景,且無標題列
- •android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen" 用系統案頭為應用程式背景,無標題列,全屏
- •android:theme="@android:style/Translucent" 半透明效果
- •android:theme="@android:style/Theme.Translucent.NoTitleBar" 半透明並無標題列
- •android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" 半透明效果,無標題列,全屏
- •android:theme="@android:style/Theme.Panel"
- •android:theme="@android:style/Theme.Light.Panel"
複製代碼
android中系統內建的樣式(style)的集錦:
Android平台定義了三種字型大小。
- "?android:attr/textAppearanceLarge"
- "?android:attr/textAppearanceMedium"
- "?android:attr/textAppearanceSmall"
複製代碼
使用方法:
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textAppearance="?android:attr/textAppearanceSmall"
複製代碼
或者
- style="?android:attr/textAppearanceLarge"
- style="?android:attr/textAppearanceMedium"
- style="?android:attr/textAppearanceSmall"
複製代碼
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"
複製代碼
AndroidProgressBar
- style="?android:attr/progressBarStyleHorizontal"
- style="?android:attr/progressBarStyleLarge"
- style="?android:attr/progressBarStyleSmall"
- style="?android:attr/progressBarStyleSmallTitle"
複製代碼
分隔字元橫向:
- <View
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:background="?android:attr/listDivider" />
複製代碼
分隔字元縱向:
- <View android:layout_width="1dip"
- android:layout_height="fill_parent"
- android:background="?android:attr/listDivider" />
複製代碼
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"