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 7741641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:04:37+00:00 2026-06-01T09:04:37+00:00

I am working on view pager module in android. I am facing a problem

  • 0

I am working on view pager module in android. I am facing a problem in refreshing the layouts when a particular button is clicked in the viewpager adapter class. My scenario is in this way:
1. I have view with text and image.
2.When image button is clicked, the text should get invisible and image should be shown and vice versa.
Whenever i click on the button, the change takes place on the next screen instead of the current screen. I want the change to be taken place on current screen itself.

If anybody knows how to deal with it, please help me out.

  • 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-06-01T09:04:38+00:00Added an answer on June 1, 2026 at 9:04 am

    When working on view pager, if u want to make changes dynamically to the screen at run time for example when you click a button image/text should appear and vice versa….declare the views inside the onInstantiateItem call back method of View Pager class. The views should be declared with final modifier, then only the changes take place on current screen instead of next screen. Note that, even if u are using variables like int, string etc….everything should be declared inside onInstantiateItem method.
    This fixed my problem!!!

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

Sidebar

Related Questions

Hi I'm working with a view pager and fragments. I would like to override
I am working with the .Net List view along with a data pager to
I'm working on a tablet app which lets you view videos and page through
I'm working on a page that, when I load into IE8 and view the
I have a working table view on my iphone app, and am implementing a
I have a form in witch users can add their working hours view them
i working on map view. i want to put overlay item on the map
I am working on a view that selects an image (chart) based on user
I have a DatePicker working on a View which also has a ViewModel associated
i have implemented a list view its working fine but when i click on

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.