更改手机窗口画面底色
2012-09-03 13:34
190 查看
参考android SDK开发范例大全
方法一:
在指定Layout背景。
setContentView(R.layout.main);//加载页面布局。
事先定义颜色代码(color code)以drawable的名称(name)存放在resources中。
大熊爱猫猫
方法一:
在指定Layout背景。
setContentView(R.layout.main);//加载页面布局。
事先定义颜色代码(color code)以drawable的名称(name)存放在resources中。
<?xml version="1.0" encoding="utf-8"?> <resources> <drawable name="darkgray">#808080FF</drawable> <drawable name="white">#FFFFFFFF</drawable> </resources>
布局文件中设置背景颜色。 <?xml version="1.0" encoding="utf-8"?> <AbsoluteLayout android:id="@+id/widget35" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/white" <!--设置背景颜色--> xmlns:android="http://schemas.android.com/apk/res/android" > <TextView android:id="@+id/widget28" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/str_id" android:textColor="@drawable/darkgray" <!--设置字体颜色--> android:layout_x="61px" android:layout_y="69px" > </TextView> <TextView android:id="@+id/widget29" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/str_pwd" android:textColor="@drawable/darkgray" android:layout_x="61px" android:layout_y="158px" > </TextView> <EditText android:id="@+id/widget31" android:layout_width="120dip" android:layout_height="wrap_content" android:textSize="18sp" android:layout_x="114px" android:layout_y="57px" > </EditText> <EditText android:id="@+id/widget30" android:layout_width="120dip" android:layout_height="wrap_content" android:textSize="18sp" android:password="true" <!--设置editText为密码形式--> android:layout_x="112px" android:layout_y="142px" > </EditText> </AbsoluteLayout>
大熊爱猫猫
相关文章推荐
- Android学习笔记(二) —— 更改手机窗口画面底色—color定义颜色常数的方法
- 更改手机窗口画面底色-----drawable定义颜色常数的方法
- 更改手机窗口画面底色
- 3.2 MonoForAndroid用户人机界面-更改手机窗口画面底色
- Android基础教程(二)之------更改手机窗口画面底色
- Android初级教程九——更改手机窗口画面底色
- Android SDK 开发范例大全---3.2更改手机窗口画面底色
- 更改手机窗口画面底色和控件颜色
- 更改手机窗口画面底色——color.xml定义颜色
- 更改手机窗口的颜色
- MFC 静态文本框使用/更改button背景色/不使能button/设置标题/不显示控件/窗口最大最小化
- 谷歌不小心从远程更改了部分 Android 手机的电力设定
- 一些手机 网页可视窗口大小
- HTML5下DOM元素在窗口中拖动(更改位置)
- 【VC编程技巧】窗口☞3.5对单文档或者多文档程序制作启动画面
- Win10预览版10525更改窗口标题栏配色方法图文分享
- 打开一个iframe,从iframe更改父窗口parent里面的内容,jquery弹出窗口插件fancybox的使用
- EasyPusher手机直播图像旋转90度后画面重复的问题
- css3 的shake效果,css3抖动窗口 大部分手机浏览器都支持
- 安卓手机更改IMEI串号的方法