標籤:介面 color
將介面背景設定為黑色的幾種方法:
- 建立項目時候 第二次next之後(不同sdk版本可能不同),Background Color項點擊可選。
- 開發布局檔案,選擇視圖查看 就是下邊二個選項卡中的第一個(Graphical),然後上邊有個
AppTheme點擊->Theme->前三項(Theme.Black等)都可以
- 在你最外層的layout裡邊設定 android:background="#000000"屬性
- 在manifest中對應activity屬性中,添加下邊任意一種(設定白色同理,白色色值 #FFFFFF Theme.Light等)
系統內建樣式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="Translucent"
?android:theme="Theme.Translucent.NoTitleBar"
?android:theme="Theme.Translucent.NoTitleBar.Fullscreen"
?android:theme="Theme.Panel"
?android:theme="Theme.Light.Panel"
再搭個設定編輯框背景的方法
設定編輯框樣式,就是給那個框加個背景圖片,
給一張感受下 http://www.easyicon.net/1116240-input_icon.html下載最大的那個96px的png格式。
下載之後改名(注意不能有大寫字母),然後copy到res檔案夾下任意以drawable開頭的檔案夾下,
在layout檔案中 edittext設定屬性 android:background="@drawable/text_img"