What is the view element in Android which gives an effect like an HTML textarea input widget?
I want to create a form to send Email and for the body field I want to create a textarea type of UI element in the form.
Can someone suggest the way to do this?
The <textarea> HTML element represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form.
So we have set android:inputType = textMultiLine to make our EditText support multiple line and keyboard's enter button will add lines instead of submit. And we set android:gravity = top|left, its inner gravity of EditText which moves the cursor to Top-Left corner of EditText. Which looks like TextArea of a webpage.
The <textarea> tag defines a multi-line text input control. The <textarea> element is often used in a form, to collect user inputs like comments or reviews. A text area can hold an unlimited number of characters, and the text renders in a fixed-width font (usually Courier).
EditText
would seem to be the obvious choice here.
You'll need to set the android:inputType
attribute to textMultiLine
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With