[SOLVED] How can I write in EditText at any position?

Issue

If I click in center into EditText my cursor will be move to start position but I want edit my Edit Text in any position wherever I click, for example – center. How can I do it?

My code:

<EditText
        android:id="@+id/description_input"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:ems="10"
        android:gravity="top"
        android:inputType="textMultiLine"
        android:minHeight="48dp"
        android:text="Name" />

Solution

In any position ? It is not possible. Maybe if you "fill" your EditText with space character…

If you want to enter character from the middle, use android:gravity="top|center"

Answered By – Bruno

Answer Checked By – Timothy Miller (BugsFixing Admin)

Leave a Reply

Your email address will not be published.