Login Layout Issue in Multi-Layout Screens

I’ve been working on a project where I’ve created a login screen that exists within the same screen as multiple other layouts, all aligned vertically. This design allows for a seamless user experience, transitioning between layouts within the same screen.

However, I’ve encountered an issue that I believe some of you might have faced as well. Here’s the scenario:

  1. The user logs in successfully, transitioning from the login layout to another layout within the same screen (let’s call this Screen 2).
  2. From Screen 2, the user navigates to another screen lets say screen 3.
  3. When the user navigates back to Screen 2, instead of seeing the logged-in layout, they are redirected back to the login layout and asked to log in again.

what to do in that case, please help

Why go to the trouble to build up virtual screens, then add another real screen ?

To answer your question, you will need to save all the login details to tinydb, and have a check variable (logged-in), so that when you return to the previous screen all the details are then filled out again.

Hey! So, let's talk about the situation I'm facing. If I understood correctly, I have multiple layouts on Screen 2, and when you're on Screen 3, you want to navigate back to a specific layout on Screen 2. However, I'm not sure how to achieve this.

Any solutions?
I have solved the issue to save login data to tinydb

See this example:

Tim, nothing works I tried my best.

Kindly help me out. :sob:
What I want is after you logged in, u click a button which goes to another screen. and when u will click the button from that screen, instead of redirecting you to login in again, it should redirect u to the logged in page where u see logout button. thats it

user_logs.aia (14.2 KB)

As above, store logged-in details to tinydb so that you can restore them, return to the correct virtual screen.

I got it Tim, but as u said when you return to the previous screen all the details are then filled out again.

in that case how does it perform auto logged in?

cuz i dont want to do sign in task again since i have already logged in. So when u click a button from another screen how it come back to a specific layout of the main screen. that's what i want

Since you are an expert in this area, kindly help me

who said that :wink:

You may need to consider using an activity life cycle extension to effectively handle logging out, if you cannot rely on the user to do it.