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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:02:21+00:00 2026-06-06T12:02:21+00:00

I decided to avoid for now the set preferences method for setting user settings.

  • 0

I decided to avoid for now the set preferences method for setting user settings. Im a noobie to android and xml.
I have a layout that I display with various radio buttons, check boxes, and selectable imagebuttons. I would like to know how after I display the layout (nothing is set) to change the display to match the stored user preferences programatically. And also how to query each item on the layout screen for its selected state. Some of my settings.xml code. Variables for the two items are WifiOn and AirplaneOn.

    <CheckBox
    android:id="@+id/CkBxAutoWifiStart"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:clickable="true"
    android:onClick="ToggleAutoWifiOnOff"
    android:text="Turn Wifi On If Off" />

    <CheckBox
    android:id="@+id/ckBxAutoAirPlane"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:clickable="true"
    android:onClick="ToggleAutoAirPlaneModeOnOff"
    android:text="Turn Air Plane Mode Off If On" />
  • 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-06T12:02:23+00:00Added an answer on June 6, 2026 at 12:02 pm

    You only need to set each component in the onResume of your setting activity.

    First you need to have a reference to each component.

    CheckBox myCheckBox = findViewById(R.id.checkBox);
    

    On your onResume just check in shared preferences and set the state of each component.

    myCheckBox.setChecked(true);
    

    is that or maybe i misunderstood the question?

    Regards,
    Alex

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

Sidebar

Related Questions

I have been an avid TFS user since 2005 but decided to skip the
Let's say I have a legacy application that, for various reasons, previous developers decided
Decided to use Apache's Common Configuration package to parse an XML File. I decided
I decided to try to my hand at this, and have had a somewhat
I decided to have a go at PDO. The function below should move a
I have a script that makes barplots, and opens a new window when 6
I have some old C# plugin code that was implemented strictly with Reflection. In
I decided to learn how to use an ORM to avoid learning some SQL
I have a Cocoa project with an object that holds information from a SQLite
I have been working with managing agile teams for quite some time. Now I'm

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.