I\'m using an EditText of some predefined size, however when a user enters more text then fits in the text box, they aren\'t able to scroll the text with touch. Scrolling do
A simple way to do scroll-able text in edittext if parent is NestedScrollView or ScrollView
XML code
android:gravity="top"
android:inputType="text|textMultiLine"
android:lines="5"
Use below code for Kotlin
editText.setOnTouchListener { v, event ->
if (v.id == R.id.editText) {
v.parent.requestDisallowInterceptTouchEvent(true)
when (event.action and MotionEvent.ACTION_MASK) {
MotionEvent.ACTION_UP -> v.parent.requestDisallowInterceptTouchEvent(false)
}
}
false
}