I have checked everywhere for a solution to this, but cant find. I would appreciate any simple and clear guidance on how to achieve this.
I am building a native app, and trying to give an element ‘fixed position’ on the page so that when the page scrolls, the element stays fixed in its position. From reading through the forum, I see that putting the element in a floating group is the way to go. But the issue I am having with using floating group to achieve this is that, the floating group appears on all other screens of the app. That is, if you place floating group and position it at the top, it will appear on top for all other screens of the app. This is not what I want to achieve.
Let’s call my native screen ‘Screen 1.’ I want it to be that, when I add a fixed element on Screen 1, it shows only on Screen 1 and not on any other screen. How can I achieve this with floating group, assuming floating group is the only way to achieve fixed positioning? If there are other ways to achieve this without floating group, kindly share.
What floating group does is, it shows across all screens of the native app. That is, it is appended to the body of the whole app, instead of appending to just the one screen you want it to be on. This is useful for things like reusable nav bars which you want to show up across the entire app, but what if you want to hide it on some screens, what do you do then?
One more thing though, the element I was trying to give a fixed positioning to is Back Button icon. So that the user can go back to the previous screen.
What I initially did was to manually add the button icon to each screen that needs it. I then used State feature to dictate which screen each back button goes to when clicked.
Now that I have used Floating Group to show just one Back Button across multiple pages that I need to have a back button, how do I dynamically tell which Screen is the previous screen when a Back Button is clicked on any Screen? E.g on Twitter, as you keep clicking the back button, it keeps going to the previous page until you get to the first screen.
So, I want to know how to dynamically determine the previous page, now that I have just one Back Button in a Floating Group.
Hey @adamhholmes My bad! I thought this worked, but I was quick to assume it worked across all screens. Could you help with a sample conditional to set on the floating group so it can only show on some screens and not show on other screens that I dont want it to show on? Remember that I am building a one-page app.
What I did was hide the floating group on page load, then try to use State to display it like so: if [Index’s] [nameOfState] = ‘random text e.g. sign up’ , show the floating group. This is not working. The floating group still stays hidden.
How do I navigate this? If you could show tell me what conditions to set, would be nice.