Changing Activity Using Swipe

I want the user to be able to change the activity of my Android application by scrolling up / down / left / right. I still could not find a way to do this, I experimented with GridView and GridViewPager, however it is useless for now, because I want to create a โ€œtableโ€ of actions that the user views between where the rows and columns are of variable length. For instance;

Act 01 - Act 02 - Act 03 - Act 04
Act 05 - Act 06 - Act 07
Act 08 - Act 09
Act 10 - Act 11 - Act 12
Act 13 - Act 14 - Act 15 - Act 16 - Act 17

In the above example, scrolling left and right will lead the user to the corresponding action from the left or right, if, however, the user had to scroll up or down, he will transfer them to the first activity in the line above / below where they wiped.

e.g. User is on Act 09;
Swipe left = Act 08
Swipe right = No action
Swipe up = Act 10
Swipe down = Act 05

As far as I can tell, this cannot be done using the grid view.

,

+4

Source: https://habr.com/ru/post/1671090/


All Articles