我在XML中写了一个EditText:
<EditText
android:id="@+id/create_benefit_add_titale"
style="@style/promotion_create_promotion_add_title_bcg"
android:drawableRight="@drawable/promotion_create_promotion_plus_icn"
android:hint="@string/create_benefit_add_titale" />
当调用setError("sss")
时,drawableRight
会发生改变。
我希望在调用setError(null)
后,drawableRight
可以返回drawable/promotion_create_promotion_plus_icn
。
在Java代码中:
@Override
public void afterTextChanged(Editable s) {
((EditText) getCurrentFocus()).setError(null);
}
谁能帮帮我?