转自:http://www.apkbus.com/android-131242-1-1.html 之前发现设置"AndroidManifest.xml"的主题会引起组件样式问题 设置成android:theme="@android:style/Theme.NoTitleBar" EditText组件为带边框的 设置成android:theme="@style/AppTheme" EditText组件为不带边框的 研究了一下午,在网上查了很多资料 通常做法有两种: 一种是网上比较推崇的用图作背景,另一种则是自绘 具体看文章: http://blog.youkuaiyun.com/zhangzhikaixinya/article/details/7829729 其实还有另外种做法通过XML形式:
-
- <P style="LINE-HEIGHT: 20px; FONT-FAMILY: Georgia; LETTER-SPACING: 2px; COLOR: rgb(147,141,111)"><SPAN style="BACKGROUND-COLOR: rgb(255,255,255)"><FONT color=black size=3><EditText
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/public_normal_edittext"
- android:drawableLeft="@drawable/public_call_img_normal"
- android:drawablePadding="10dp"
- android:hint="@string/stylist_txt_ndch"
- android:inputType="textPersonName"
- android:singleLine="true" /></FONT></SPAN></P>
复制代码
android:drawableLeft="@drawable/public_call_img_normal" @string/stylist_txt_ndch 最后效果如图: http://liuzhichao.com/p/612.html 各位可以去掉,另外要引入一个“public_normal_edittext.xml”下附件 密码微博私信我 http://weibo.com/henrymobilenet?topnav=1&wvr=5 |