How to scroll EditText contents inside ScrollView

In some case we want to scroll contents of EditText inside ScrollView, for an example we have registration form and inside that form we have field like address or a field which have a multiple lines.

It is directly not possible, when we try to scroll contents of EditText it will conflict with ScrollView. So, Instead of using ScrollView we use NestedScrollView and we put EditText inside it.

Still scrolling inside EditText will not work, we have to provide two properties to the EditText.  

OverScrollMode and scrollbarStyle.

If you want to do it programmatically. You can use below code.

Leave a Comment

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