Skip to content

Commit 6c06940

Browse files
committed
Initial commit
1 parent 184156f commit 6c06940

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

forminputkotlin/src/main/java/com/omarshehe/forminputkotlin/FormInputMultiline.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,15 @@ class FormInputMultiline : RelativeLayout, FormInputContract.View, TextWatcher
142142
txtMultiline.isVerticalScrollBarEnabled = true
143143
txtMultiline.overScrollMode = 0
144144
txtMultiline.setOnTouchListener { v, event ->
145-
v.parent.requestDisallowInterceptTouchEvent(true)
146-
if (event.action and MotionEvent.ACTION_MASK == MotionEvent.ACTION_UP) {
147-
v.parent.requestDisallowInterceptTouchEvent(false)
145+
if(txtMultiline.isFocused){
146+
v.parent.requestDisallowInterceptTouchEvent(true)
147+
if (event.action and MotionEvent.ACTION_MASK == MotionEvent.ACTION_UP) {
148+
v.parent.requestDisallowInterceptTouchEvent(false)
149+
}
150+
148151
}
149152
false
153+
150154
}
151155
}
152156

0 commit comments

Comments
 (0)