Disable screen swipe?

Hello I did some research on this topic on the forum before posting but none works for me.

Here is my screen hierarchy

My problem is that when I change my screen user to the Editionv4 screen.

It displays a data viewer list if the user clicks the button on the left. Thunkable understands this as a temp to temp swipe and it’s really disabling.

This screen the editionv4 should be invisible in the bottom tab but accessible via the blocks but I want the user not to be switched to this screen via a swipe gesture.

Do you have ideas ?

1 Like

Stack navigator does not have tabs.

Yes but the stack navigator also has the problem of swipe

No one has no solutions?

I doubt there is a solution for that. the screens are swiping to reveal pages we rather not have users see without signing in. It almost makes the sign-in feature useless. Hopefully they will find a way to lock the screens soon and not make them swipeable.

2 Likes

Thanks, I found an alternative I dragged this screen into a drawer navigator. And make it so that when the user swipes to the left it displays the menu but it doesn’t leave the page. Then I added a help tab to make it look like this menu is really useful.

3 Likes

Awesome. Great idea. Finally a solution to this pain in the …

@kushweez I had the same issues while building my app and came to the conclusion that the stack navigator is a disaster in many ways. What you need can be done with tab navigators; I have implemented it in my app and it works flawlessly on both iOS and Android. Here is what you need to do:

  • Use tab navigators (both top and bottom work fine. I use bottom).
  • Hide their navigation icons and use the “Navigate to” block to move between screens.
  • Have a “Back” button on every screen except the root one of course.
  • If you have screens that are in “order” (i.e. A takes you to B, B takes you to C, C takes you to D), you will need to create tab navigators within tab navigators (that is the trick really, it is not obvious but when you realize it, it works perfectly). In my case, I have a root screen with buttons that take you to sub-screens but no deeper than that so I only need one tab navigator.

Edit: What you need to understand about tab navigators is that each has one screen it will default to when you hit the “Back” button on your Android device. So for example, let’s say you have a tab navigator with 3 screens (A, B, C) and you use buttons to navigate from A to B and from B to C, when you get to screen C and hit the back button (or gesture) on your Android device, it will take you to screen A, not screen B as you would expect. This is the behavior you need to tackle by nesting tab navigators so in this example you need to create a tab navigator to host screens B and C so when you hit the back button while on screen C, it will return you to screen B (and not screen A) as B is now the “default” screen for the nested tab navigator. That is basically what took me countless hours of trial and error to understand until I finally got it right.

2 Likes