Skip to content

Commit

Permalink
disallow et scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
em-ad committed May 30, 2022
1 parent d4dc3f1 commit 40c2518
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chatkitlight/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
versionCode 125
versionName "3.0.47.4.23"
versionCode 126
versionName "3.0.47.4.24"
vectorDrawables.useSupportLibrary = true

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.View;
import android.widget.EditText;
import android.widget.FrameLayout;
Expand Down Expand Up @@ -295,6 +296,20 @@ private void init(Context context) {
inflate(context, R.layout.view_message_input, this);

conversationInput = findViewById(R.id.messageInput);
conversationInput.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (v.getId() == conversationInput.getId()) {
v.getParent().requestDisallowInterceptTouchEvent(true);
switch (event.getAction() & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_UP:
v.getParent().requestDisallowInterceptTouchEvent(false);
break;
}
}
return false;
}
});
attachmentButton = findViewById(R.id.attachmentButton);
recordView = findViewById(R.id.record_view);
animButton = findViewById(R.id.anim_button);
Expand Down

0 comments on commit 40c2518

Please sign in to comment.