I want to do something like the image.
This is an email fill button. when the user enter his email, the title "אימייל"("Email) should be disable ,so that use cannot touch it.
what is the way to do it? thanks :)
I want to do something like the image.
This is an email fill button. when the user enter his email, the title "אימייל"("Email) should be disable ,so that use cannot touch it.
what is the way to do it? thanks :)
You can do like this :
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#F2F2F2"
android:orientation="horizontal" >
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="3dp"
android:text="Your mail" />
<View
android:layout_width="1dp"
android:layout_height="30dp"
android:layout_marginBottom="3dp"
android:layout_marginTop="3dp"
android:background="#000000"
android:text="New Button" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:background="@android:color/transparent"
android:padding="5dp"
android:text="אימייל" />
The result is :
Make one textwatcher for that edittext and if total Charactes are >0 then enable your button other wise
Yourbutton.setEnable(false)
Try that. Here is the textwatcher example