How to make EditText not editable but scrollable

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


1 Comment

  1. fabrizio Pucci | | Reply

    Great !
    Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *