Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6141147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:12:36+00:00 2026-05-23T18:12:36+00:00

I have a class which reads an XML file to create several screens in

  • 0

I have a class which reads an XML file to create several screens in a Horizontal Page flipper.
However, the view content can be different when changing from portrait to landscape or back.

I’d like to save the current selected page so whenever I swap my screen it uses that value again to build up the new orientation screen.

I use a HorizontalPager class which can retrieve current page by getCurrentScreen() (returns an integer) and one to set the page setCurrentScreen(int currentScreen, boolean animate)

So whenever I switch screens, the current page should still be selected, instead of creating the whole thing again and starting from page 1 (0 in the array).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:12:36+00:00Added an answer on May 23, 2026 at 6:12 pm

    I just slept over my question and solved it myself 🙂

    What I did is:

    I made a method called setPager(int pager) that sets my static in Pager to the current page.
    This method is called from the HorizontalPager class whenever a screen is flipped.

    Every time the screen flips, the onCreate() is called, and my HorizontalPager will be set to the value my static int has with a method setPager(int pager).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class which reads some settings from an XML file with simplexml.
I have a class A which reads an XML file and does some processing.
I have a python class which reads a config file using ConfigParser: Config file:
I have created new class to read the data from xml file, which looks
Okay, I have a function which reads a xml file and creates controls using
I have an XML file which I need to read and load the data
I have a WP7 which read a XML file , take some elements and
I have a simple XML file here which I converted to XSD with xsd.exe
Suppose I have a junit custom class loader, which reads the test data from
I have a service application that on startup reads an XML file and starts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.