Search code examples
kotlinandroid-edittext

How to make the <EditText non moveable when typing in multiple line?


i tried to make the edit text non moveable but i dont know how, can you please help me. I'm using relative layout only

<EditText
        android:id="@+id/textinput"
        android:layout_width="331dp"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="85dp"
        android:ems="10"
        android:gravity="start|top"
        android:inputType="textNoSuggestions|textMultiLine"
        android:scrollHorizontally="true"
        android:hint="Input your secret text here.."/>

The image as shown below the link

here is the screenshot of the problem


Solution

  • Okay guys, i had found the solution

    android:lines="1"
    

    just add this line :)