Orientation change in the Sliding Panels example

aulhan

New Member
Licensed User
Longtime User
Looked everywhere for this but cant seem to find a solution.

For the sliding panels example how can I conserve state, and not go back to the first panel when the device changes orientation, basically staying on the same panel which was visible when the orientation change occurred?


Thanks.
 
Last edited:

walterf25

Expert
Licensed User
Longtime User
Screen Orientation Change

Hi there, i'm glad you found a solution to your this matter, however i don't see the solution posted anywhere here on this thread, is there a way that you can share your code or that part of the code with me, i'm looking for a way to maintain the current screen view when orientation changes, can you help me out, thanks for your help.

regards,
Walter:sign0085:
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
As Erel said, he has updated the original code, so you can download it via the first post.
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Screen Orientation Change

Thanks but that doesn't answer my question, maybe you can help me, how can i accomplish staying on the current screen when the screen orientation changes, i have 4 screens, when i go to any of the screens and i tilt my phone to change from portrait to landscape orientation it takes me back to the first screen, how can i remain in the current screen regardless of the screen orientation?

Regards,
Walter Flores:BangHead:
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
Thanks but that doesn't answer my question, maybe you can help me, how can i accomplish staying on the current screen when the screen orientation changes, i have 4 screens, when i go to any of the screens and i tilt my phone to change from portrait to landscape orientation it takes me back to the first screen, how can i remain in the current screen regardless of the screen orientation?

Regards,
Walter Flores:BangHead:

You have to setup your project as PORTRAIT (or Landscape), do it on the designer, check attached picture.
 

Attachments

  • Orientation.JPG
    Orientation.JPG
    32.4 KB · Views: 293
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Screen Orientation Change

I think you are misunderstanding my question, doing what you are suggesting will only set the screen orientation to a specific fixed orientation, what i'm trying to do is keep both portrait and landscape orientation, but when i switch from one orientation to another it always takes me back to the first screen, and what i want is to keep the current screen regardless of the screen orientation. :)
 
Upvote 0

timwil

Active Member
Licensed User
Longtime User
In the process_globals I set up a variable - currentpage as Int

in the activity pause i set the currentpage to the current page

in the activity resume i check what is the current page and select that
 
Last edited:
Upvote 0
Top