-
-6 1
-
<EditText
android:layout_width="fill_parent" //宽度填充父组件
android:layout_height="58px" //自定义宽度
android:gravity="left|center_vertical" //将输入框的字体位置定义为居左+垂直居中
android:hint="@string/thread_post_title_def" //自定义默认显示的文字 初始化文字
android:layout_below="@id/topbanner" //自定义显示的位置 位于xxx控件之下
android:layout_marginTop="10px" //自定义左外边距
android:layout_marginLeft="10px"
android:layout_marginRight="10px"
android:background="@drawable/thread_title_input" //自定义背景 背景是下面的thread_title_input.xml 位于drawablez文件夹中
android:textColor="#FFFFFF" //自定义输入文字的颜色
android:textColorHint="#FFFFFF" //自定义默认文字的颜色
android:paddingLeft="15px" //自定义缩进的大小 通过内边距来实现缩进
android:id="@+id/thread_title"/><?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/thread_title_input" /> //自定义输入框的背景色 也可以是图片等等
<corners android:radius="5dip" /> //自定义显示的圆角大小
</shape>
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
- 评论(1)
发表评论 TrackBack