I have a scrollview inside which there is a editext which is multiline. I want to scroll the edittext to see the lower content but it can\'t be done.
Thanks to Hariharan, vovahost I got the same solution, but added performClick() to avoid a warning.
EditText (XML):
android:overScrollMode="always"
android:scrollbarStyle="insideInset"
android:scrollbars="vertical"
Code:
edit_text.setOnTouchListener { view, event ->
view.parent.requestDisallowInterceptTouchEvent(true)
if ((event.action and MotionEvent.ACTION_MASK) == MotionEvent.ACTION_SCROLL) {
view.parent.requestDisallowInterceptTouchEvent(false)
} else {
performClick()
}
return@setOnTouchListener false
}