Hi i have a edit text with the hint, i made the hint as middle using android:gravity:"center". when i start typing from in the edittext the typing is starting from the middle, how to make the typing start from leftcorner while still hint is centered
<EditText
android:id="@+id/edittext"
android:layout_width="230dp"
android:layout_height="110dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/imageView1"
android:layout_marginLeft="5dp"
android:layout_marginTop="33dp"
android:layout_toLeftOf="@+id/relativeLayout1"
android:background="@drawable/roundcorners"
android:ems="10"
android:gravity="center_horizontal"
android:hint="@string/fbhint"
android:lines="6"
android:paddingRight="5dp"
android:textSize="14sp"
android:windowSoftInputMode="stateHidden" />
By default android EditText has center gravity. Just make it
android:gravity="top|left"Also there is no any special attribute for making hint in center and text in top. Both follow the same gravity attribute.
Android hint is a just for something like a label for where user has to start input the characters.