Lestr1992 Lestr1992 - 6 months ago 15
Android Question

edit text with label inside in android

enter image description here

can anyone know how to make this?

i think this is a editText
but how can i put a label and text at the same time?

thanks in advance

Answer

Try this out :

<FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

    <EditText
            android:id="@+id/editText1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="40dp" >

        <requestFocus />
    </EditText>

    <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:paddingLeft="10dp"
            android:text="Gender" />
</FrameLayout>

Hope it helps.

Comments