Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲

Android 系統自帶樣式 android:theme 一覽

編輯:關於 Android 程式設計

Android 內建了不少現成的主題樣式,透過 android:theme 屬性即可快速套用,省去自行定義的麻煩。以下整理常用的幾種:

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="Theme.Translucent":透明背景。

android:theme="Theme.Translucent.NoTitleBar":透明背景且無標題。

android:theme="Theme.Translucent.NoTitleBar.Fullscreen":透明背景、無標題、全螢幕。

android:theme="Theme.Panel":面板風格顯示。

android:theme="Theme.Light.Panel":淺色面板風格顯示。

這些主題涵蓋了對話框、全螢幕、透明、壁紙背景等常見需求,開發時可依畫面設計直接套用。

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © Android教程網 All Rights Reserved