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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T21:45:57+00:00 2026-05-19T21:45:57+00:00

I’m beginner in Java Android developing. I’m using Eclipse SDK 3.6.1 version. I’m trying

  • 0

I’m beginner in Java Android developing. I’m using Eclipse SDK 3.6.1 version. I’m trying to this: first class is watching a two RadioButtons status from second class. I’m trying to set RadioButton status when they are not clicked.

First class:

public void onClick(View view) {        
    switch (view.getId()) {

    case R.id.Button01:         
        if (toolsas.rb1.isChecked()) { //do something

Second class with RadioButtons:

public void onClick(View view) {

        switch (view.getId()) {


        case R.id.RadioButton01:
            rb1=(RadioButton)findViewById(R.id.RadioButton01);
            rb2=(RadioButton)findViewById(R.id.RadioButton02);

            if (rb1.isChecked()) {
                rb2.setChecked(false);
                rb1.setChecked(true);

When I click a RadioButton rb1 and change him status to checked the first class is working, bet how to set status when I don’t click RadioButton rb1? If I firstable click Button01 the program is stopped. First class have few buttons, when I push the Button01 I can call a second class and change some options
Sorry for the bad english

  • 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-19T21:45:57+00:00Added an answer on May 19, 2026 at 9:45 pm

    Its pretty hard to figure out what you are trying to do, but I think you have two different layouts, each of which has a different radio button. I think you want them to have opposite status, so that when a user checks one, the other will appear unchecked?

    If so, one way to do this is to save the state of the checkboxes to SharedPreferences. Whenever the user changes the setting of a checkbox, save its state into SharedPreferences. Whenever you load one of your Activites you can then read the value from your preferences and set the UI to match.

    • Data Storage
    • SharedPreferences reference
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I am trying to loop through a bunch of documents I have to put

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.