ConstraintLayout constraintLayout = (ConstraintLayout) findViewById(R.id.parent);
for (int i = 0; i < 5; i++) {
EditText editText = new EditText(Home.this);
constraintLayout.addView(editText);
}
constraintLayout .setOnTouchListener(new Home.OnSwipeTouchListener(Home.this) {
@Override
public void onSwipeLeft() {
Toast.makeText(getApplicationContext(), "parent swipe", Toast.LENGTH_LONG).show();
}
});
I want to add on swipe left and right event, but when I try,constrain layout is not swiping instead edittext is poping keyboard. I searched for this problem I got solution that use onintercepttouchevent but I don't know how to use it with my code and where to call this function