android - Text of a editText is disappears when Focus changed -
my layout parent relativelayout. inside relativelayout have 3 linearlayouts. 3rd linearlayout having 2 edittexts, in bottom of screen.
the problem when click on edittexts keyboard coming, m able enter text on edittext. dismiss keyboard. after have 1 button whenever user press button m disabling these 2 edittexts time text disappears edittexts.
this problem in devices only, faced problem in samsung sm-t210r, os version 4.4.2
this edittext code.
<edittext android:id="@+id/etinvemail" android:layout_width="200dp" android:layout_height="wrap_content" android:layout_weight=".25" android:inputtype="textemailaddress" android:typeface="serif" /> please give me solution.
you can using selector:
drawable/my_custom_edittext.xml:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:color="#ff0000"/> <item android:color="#0000ff"/> </selector> layout/main_activity.xml:
<edittext android:id="@+id/edit" android:layout_width="match_parent" android:layout_height="wrap_content" android:enabled="false" android:text="your text" android:textcolor="@drawable/my_custom_edittext" /> it should solve problem.
Comments
Post a Comment