Questions tagged [android-radiobutton]

Use for the android.widget.RadioButton element. Radio buttons are normally used together in a RadioGroup.

Radio buttons allow the user to select one option from a set. You should use radio buttons for optional sets that are mutually exclusive if you think that the user needs to see all available options side-by-side.

Radio buttons are normally used together in a RadioGroup. When several radio buttons live inside a radio group, checking one radio button unchecks all the others.

Useful links

347 questions
0
votes
2 answers

Android - Get values of Radio Buttons in a ListView

I designed a scenario which, according to my understanding of Java, should have worked out fine but unfortunately didn't. The scenario is explained in code: ListViewAdapter public final class ListViewAdapter extends BaseAdapter { private…
0
votes
1 answer

Radio button won't uncheck when it's not in a group?

I am using 7 radio buttons which correspond to days of the week. I am not putting them in a radio group because a user should be able to select multiple days/buttons. However, once the button is checked, it is permanently checked and I don't know…
user4875457
0
votes
1 answer

how to set android:drawableTop="@drawable/your_drawable_selector" through java in android?

How to set android:drawableTop="@drawable/your_drawable_selector" through java for a RadioButton in android?
JITHIN GOPAL
  • 131
  • 1
  • 14
0
votes
1 answer

How to design radio buttons vertically connected with vertical line and each radio button with different color

I have to design a layout that contains radio buttons are aligned in vertical pattern and attached with a vertical line. Each radio button is checked, with different color. Below picture will illustrate the…
hasnain_ahmad
  • 325
  • 6
  • 17
0
votes
1 answer

Android: RadioButtons within RadioButtons

I have a RadioGroup with 3 radiobuttons, say A, B and C, when I click on A, it will pop up a dialog, and using setSingleChoiceItems of the android dialog, it presents another 4 choices. The problem is that, if I clicked cancel on this dialog, A is…
0
votes
1 answer

The difference between a Button and a RadioGroup in referencing

In an android Activity class, I saw the bridging to a Button of XML file and the setting it for click listener was using findViewById(): public class MyClass1 extends Activity implements OnClickListener { Button b; protected void…
0
votes
1 answer

Android: How to only allow 1 radio button to be selected when there are 3 radio groups?

I have 3 radio groups, a total of 9 radio buttons. I separate them in groups because I would want to have them nicely aligned in the layout. However, I would like to limit users to be able to only select 1 radio buttons out of these 9, as a complete…
0
votes
1 answer

Android Radio Button PNG Drawable top

I have a Radio Group. 5 Radio Buttons. The Radio Button's DrawableTop are set as, android:drawableTop="@drawable/Timeline_icon_drawable"
0
votes
1 answer

Style of RadioButton magically changes when put into a Listview?

I made a DialogFragment with a RadioButton ontop and a ListView below containing more RadioButtons. And now I'm just wondering what style the ListView uses that the RadioButtons don't look the same as the "stand-alone" one. Here is a snippet of my…
0
votes
1 answer

Selector drawable in RadioGroup

I have customized a RadioGroup to work as a "tab holder". Each "tab" is a RadioButton. I have set android:button=@nullbecause I am just using the text and also I have set a selector to the background. When the RadioButton is checked or unchecked…
0
votes
2 answers

How to disable radio button in a radio group in quiz application in android

I have developed an quiz based android application in which I'm loading question and answers from an array everything works fine but only issue I'm facing is after selecting an option for a particular question and submitting it the selected option…
Sunil
  • 49
  • 1
  • 12
0
votes
1 answer

Create a ListView with RadioButton control which on clicking a Button input control jumps to another activity

New to android here. I intend to make an app that has a ListView with Radio buttons set in single choice mode. After the user selects a radio button for the corresponding ListView item, and after clicking a Button input, it should take the user to…
0
votes
1 answer

Creating object using a form, adding it to a list on another activity

I want to retrieve a value from a text of a radiobutton inside a radiogroup. This sounds really simple but I am not being able to put it to work as it always gives me a null value. Here is my code: public class NewMovie extends FragmentActivity { …
0
votes
2 answers

how to show selected value in alertDialog

Hi all in my application I am using AlertDialog, in this I have 3 values. User select one value and selected value is stored in sharepreference. I want to use this saved value and by default want to set this value as selected in radio button.…
PPD
  • 5,660
  • 12
  • 52
  • 86
0
votes
0 answers

restricting radio button on click listener in Android

I am using radio button in Android my code about radio button public void addListenerOnButton() { OnClickListener listener = new OnClickListener() { @Override public void onClick(View v) { RadioButton rb =…
Sunil
  • 521
  • 1
  • 7
  • 24