把editText的background 改成
<?xml version="1.0" encoding="UTF-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/shurukuangfocus" />
<item android:state_focused="false" android:state_pressed="false" android:drawable="@drawable/shurukuang" />
<item android:state_focused="true" android:drawable="@drawable/shurukuangfocus" />
</selector>
EditText背景定制
本文介绍如何使用XML选择器为EditText控件设置不同的聚焦和按下状态背景。通过定义不同状态下的drawable资源,实现美观且交互友好的视觉效果。
2461

被折叠的 条评论
为什么被折叠?



