在线等 请问如何隐藏EditText-CSDN论坛
展开全部
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="my_edittext_style" parent="@android:style/Widget.EditText">
<item name="android:background">@drawable/my_edittext</item>
</style>
</resources>
接下来在drawable里添加my_edittext.xml:内容如下
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="htt p:/ / schemas.androi d.c om/apk/res/android">
<item android:state_focused="true" android:drawable="@drawable/editbox_focus" /> <item android:drawable="@drawable/editbox_normal" />
</selector>
<resources>
<style name="my_edittext_style" parent="@android:style/Widget.EditText">
<item name="android:background">@drawable/my_edittext</item>
</style>
</resources>
接下来在drawable里添加my_edittext.xml:内容如下
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="htt p:/ / schemas.androi d.c om/apk/res/android">
<item android:state_focused="true" android:drawable="@drawable/editbox_focus" /> <item android:drawable="@drawable/editbox_normal" />
</selector>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询