Android swipe between fragments WITHOUT using viewpager

I want to navigate between fragments and I am currently using the viewpager. However, there is one problem: when I sit down to the right, the entries made in the EditTexts of the current fragment should be checked, and only if the input is in order, it should be transferred to the next page.

I was able to do this by disabling the viewer when needed, however I also cannot scroll to the left (i.e. the previous snippet) as the input validation method (onPageScrolled (...)) is no longer called due to the viewer disabled. It gets activated again when I type something into the EditText.

I haven't found a way to deal with this problem yet.

So, I would like to know if there is an alternative to using fragments with screen gestures? Maybe in conjunction with the setCurrentItem () method of the viewpager, but without using the scroll animation of the image viewer?

+3


source to share





All Articles