EditText not Editable but Scrollable
When we need to show long text like Terms and conditions in EditText. We need to allow scrolling and it should not be editable.
For this I tried in XML set EditText attributes to show vertical scrollbars
And then to make EditText not editable i tried different ways like
not worked, and also tried
but it is deprecated.
And then tried this line in code
Its not allowed to Edit. But unable scroll text in EditText.
And Finally i found the work around for it. Added this line in code.
It worked perfectly….
Hope this helps somebody….
You may be also interested in
- HTML Tags Supported By TextView, Android
- Apply ColorStateList for TextView
- Show soft keyboard for EditText when Fragment starts
- Validation using default feature of EditText
- EditText, Keyboard is filling the entire screen when Landscape Orientation