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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:18:28+00:00 2026-06-15T15:18:28+00:00

I successfully converted my app from activities to a tabbed/fragmented app with 2 tabs/fragments

  • 0

I successfully converted my app from activities to a tabbed/fragmented app with 2 tabs/fragments and swiping between them 🙂

Right now I have 2 tabs:
1 – The main tab – shows textfields and stuff according to settings stored in shared preferences.
2 – The settings – offers some inputs to change these shared preferences.

The problem is that when I change the settings (shared prefs) the main tab doesn’t get updated according to the new shared preferences.

I’m looking for a solution to update the main tab, and possibly another future tab or two, when the shared preferences are changed (from the settings tab) with as much decoupling as possible.
I don’t want the settings tab to explicitly hold refs to the other fragments and perform the updates…

I tried implementing some kind of observer pattern where the settings tab announces that update is needed after a settings change but did not find how to get the other tabs to actually perform the change because they are in a view pager that kinda complicates the matter…

Any help is appreciated.
I’m using the TabsAdapter from:
http://developer.android.com/reference/android/support/v4/view/ViewPager.html

  • 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-15T15:18:29+00:00Added an answer on June 15, 2026 at 3:18 pm

    You have 2 options:

    1. Reload all the fragments through the main Activity, by using getActivity() in the settings fragment.

    2. Create and interface named SettingsListener that will have a function like onSettingsChanged(), and implement it in the fragments that should be updated. The settings fragment will hold a list of listeners.

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

Sidebar

Related Questions

I have a big Silverlight app which I have successfully converted and added a
I have successfully made an app that sends a request from my Windows Phone
Using Socket.IO's WebSocket I have successfully managed a chat application from my home computer
I recently converted my app from an activity based app to a fragment based
Recently I have been working on a multiplayer networking app. I had successfully implemented
I have an iPhone app that I built using PhoneGap. I'm now looking to
I am right now working on an app which works as a book-stack,where user
How can I know if a VARCHAR field's value can be successfully converted to
I have successfully connected my Oracle 11g XEdatabase with java in Netbeans 7.1. Class.forName(oracle.jdbc.OracleDriver);
I have connected with the database successfully by using wizard in server explorer. but

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.