i have three checkboxes in my preference screen. i want to make the user select only one checkbox at a time.
How do i achieve this?
thank you in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
You would need to create an onpreferenceChangelistener:
Then to use it,
Or, you can use a ListPreference which will pop up a radio group and you can just put the three option in there. That’s what I did in my App, but If the checkboxpreferences are needed, then that of course will work.
Here’s my listpreference (for choosing how long it will ring for):
And here’s my XML for the @array/ringTime and @array/ringSetting
I know this is a 5-month old question as of today, but I thought this might help someone else. 🙂
And then for implementing the listpreference inside my code: