屏幕背景设置为黑色的几种方式:
- 新建项目时候 第二次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"
版权声明:这篇文章的博客http://blog.****.net/pipisorry原创文章,博客,未经同意,不得转载。