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
-1
votes
1 answer

How to programatically set the colour of a RadioButton Android Circle

I want to change the actual circle of the RadioButton. I have looked all over StackOverflow and nothing seems to work. I am using API 17 and cannot use a ColorStateList. Custom drawables seem to mess us the look and feel of things. I want the same…
SuperBale
  • 341
  • 2
  • 8
  • 20
-1
votes
1 answer

How do i get the last radio button that was checked from a radio group in Android?

I have created programmatically 4 radio groups with 4 radio buttons. Each radio button represents an answer to a question. Let's say that we have in the first radio group, 3 wrong answers and only one correct answer. The first, the second and the…
Alex Mamo
  • 130,605
  • 17
  • 163
  • 193
-1
votes
3 answers

Android Studio Listview with radio button value - How to check radio button and get value?

Please help.. i have listview with radio button value but my problem is i dont know to check each radio button and get the value.. this is my checkoutlayout1.xml
Joe
  • 227
  • 1
  • 4
  • 18
-1
votes
1 answer

Unable to set RadioGroup programmatically when another radiogroup element is checked

I am trying to programmatically generate two RadioGroups. I have succesfully generated the first one but I need to generate the second one onCheckedChangeListener of the first radio group. Here is my code for the activity. package…
-1
votes
1 answer

Creating a static method that builds a RadioButton returns a NullPointerException

So i have this static method whose building a RadioButton: public static RadioButton createARadioButton() { RadioButton radioButton = new RadioButton(null); return radioButton; } And i have this assignment statement: radioButton =…
God
  • 1,238
  • 2
  • 18
  • 45
-1
votes
1 answer

messed up dynamic radio buttons in ArrayAdapter

when i run my app, i get much more radiobuttons than i need. It seems the radiobuttons repeat themselves in the same group. I don't really understand what is is going on. Here is my custom ArrayAdapter. I would like to know the problem here public…
-1
votes
2 answers

Get value from radiobutton and radiogroup android

// here is my code, but the result still 0...anyone can help to fix my code? thx before :) RadioGroup rg_ringkas, rg_rapi, rg_resik, rg_rawat, rg_rajin; RadioButton…
-1
votes
1 answer

Why my RadioButton (in one RadionGroup)can be selected at the same time?

Here is my layout xml file
junlin
  • 1,835
  • 2
  • 25
  • 38
-1
votes
1 answer

Dynamically creating Multiple row radio buttons

I'm creating radio buttons dynamically based on the input .In my case layout has fixed width and height is expandable. What i want is if the radio buttons exceeds the fixed layout width , then it should automatically arrange in next row . Is this…
Strawberry
  • 667
  • 2
  • 10
  • 24
-2
votes
1 answer

null object reference in Android

I am trying to work on radio groups. I have an ok button which when clicked selects one item from four inflated radio button groups. My problem is that, when the user does not select an option from one of the groups, I have a null pointer exception.…
-2
votes
2 answers

Weird Radio Buttons Behavior In Multiple Layouts

I have a layout with three images and three radio buttons below each image. I want that if one button is checked, then I know the user has selected the above image. Here's my layout file:
Andromeda
  • 230
  • 1
  • 7
  • 22
-2
votes
1 answer

It doesn't get EditText text when the corresponding radio button is selected/checked and the Button is pressed/clicked?

@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment viewRoot = …
-2
votes
3 answers

Java/Android - Make a button visible after a radio button has been clicked

I am creating a basic quiz app, where the user is shown one question after another. In order to get to the next question, the user has to click on a button. Now, I only want this button, which gets the user to the next question, to be visible after…
-3
votes
4 answers

RadioButton and Checkbox

I have 3 radio buttons and 10 checkboxes, I just want to prevent the user from choosing any checkboxes until it chooses one of the radio buttons first, please help.
Ramlawi
  • 11
  • 4
-3
votes
2 answers

How I know RadioButton is checked or not checked?

How I know RadioButton is checked or not checked? xml file: java…
m.asadi
  • 47
  • 2
  • 13
1 2 3
23
24