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

  • Home
  • SEARCH
  • 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 6630407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:23:58+00:00 2026-05-25T22:23:58+00:00

Hello I am using a ViewPager but I would now like to retain states,

  • 0

Hello I am using a ViewPager but I would now like to retain states, instead of having cells regenerated.

I notice viewpager is very similar to a custom adapter for listviews, and they function similarly where listview regenerate data in cells after they are no longer on screen, viewpager is the same way.

Is there a way to do a viewholder, some kind of object that retains the state of each view, after it is loaded initially, so that the viewpager cells load quicker. (there is some processing and rendering for each cell, but I’ll test the limits of the memory myself)

here is my viewpager

  • 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-25T22:23:59+00:00Added an answer on May 25, 2026 at 10:23 pm

    Use FragmentPagerAdapter, which keeps all Fragment objects that have been created actively in memory:

    /**
     * Implementation of {@link android.support.v4.view.PagerAdapter} that
     * represents each page as a {@link Fragment} that is persistently
     * kept in the fragment manager as long as the user can return to the page.
     */
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello all im using this template system http://williamsconcepts.com/ci/codeigniter/libraries/template/index.html but now i want to add
Hello im using page nation which is amazing but now im trying to print
Hello I am using OpenLayers, and I would like make zoom map to show
Hello i'm using map() jquery to create a new object array DEMO but this
Hello i am using the latest version of artoolkit, and succesfully compiled simplevrml, but
hello i'm using this example http://lexandera.com/2009/01/extracting-html-from-a-webview/ to get the HTML from a webview. But
Would it be possible to print Hello twice using single condition ? if condition
How to write a simple bittorrent application. Something like a hello world using a
I have a class: class MyClass(object): @property def myproperty(self): return 'hello' Using mox and
Hello Im using HTTParty to call for a remote json file that I need

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.