I want to display multiple lines of text in my application in particular range such that user can scroll to view other lines. I have tried EditText
, but it generates keyboard on top of it and doesn't scroll properly. Then I tried TextView
, it also does not scroll the text properly as I wanted.
Is there any other option available? If No, then how to scroll the text vertically in TextView
or EditText
? I want to scroll the text on drag as in WebView
. NOT auto scroll.
Try using Edittext with making it un editable, so in this case it wont allow keyboard to popup.
Check below code
You can limit the Height of
TextView
to match the number of lines you user wants to see, then simply put yourTextView
in aScrollView
I had done a simple example to demonstrate this...
android:windowSoftInputMode="stateAlwaysHidden"
in your Manifest file in the activity where you have your EditText.It is possible to create multiline text view with scroll view. I used the following code in your application: