This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Android and the fly likes How to control CheckBox status in preferences window? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "How to control CheckBox status in preferences window?" Watch "How to control CheckBox status in preferences window?" New topic
Author

How to control CheckBox status in preferences window?

Evas Stank
Greenhorn

Joined: Feb 04, 2011
Posts: 3
0 down vote favorite


Hello. I'm beginner in Java Android developing. I'm using Eclipse SDK 3.6.1 version. I have a preferences window with two checkbox and one back button.

I want to do this thing: if I push "checkboxPref2", I want to set "checkboxPref" to false. I want that only one checkbox could be checked. This is my preferences.java:

I'm trying to do like that:

But doesn't work. Maybe someone have similar problem?
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3418
    
  12
In normal Java you would use Radio Buttons instead of check boxes. You then add the two radio buttons to a radio button group (I think that's what it's called - it's a while since I did any Swing) and then the unchecking of one box when you check the other would be handled automatically. Can the Android GUI classes do something similar ?


Joanne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to control CheckBox status in preferences window?
 
Similar Threads
ListPreference problem
Problem with creating a simple Menu in Browser view.
Cannot find the problem in the code
Problems with listview and checkbox event
Why error in this code