How to get multiple lines of EditText on Android

Asked 1 years ago, Updated 1 years ago, 113 views

Please teach me how to get multiple lines of EditText on Android.

android text multiline

2022-09-22 13:54

1 Answers

On Android, EditText basically allows multiple lines.

<EditText
    android:inputType="textMultiLine" <!--Set MultiLine for inputType -->
    Android:lines="8" <!-- Make it look like 8 lines on the screen. -->
    android:minLines="6" <!-- Minimum of 6 lines -->
    android:maxLines="10" <!-- Up to 10 lines -->
    android:layout_height="wrap_content" 
    android:layout_width="fill_parent" 
    android:scrollbars="vertical" <!--Set vertical scrollbar -->
/>


2022-09-22 13:54

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.