Questions tagged [android-radiogroup]

This class is used to create a multiple-exclusion scope for a set of radio buttons. Checking one radio button that belongs to a radio group unchecks any previously checked radio button within the same group.

This class is used to create a multiple-exclusion scope for a set of radio buttons. Checking one radio button that belongs to a radio group unchecks any previously checked radio button within the same group.

Intially, all of the radio buttons are unchecked. While it is not possible to uncheck a particular radio button, the radio group can be cleared to remove the checked state.

The selection is identified by the unique id of the radio button as defined in the XML layout file.

XML Attributes

See RadioGroup Attributes, LinearLayout Attributes, ViewGroup Attributes, View Attributes

Useful links

315 questions
0
votes
1 answer

Android AlertDialog RadioGroup Incrementing?

I'm trying to show a radiogroup with 2 buttons in an alert dialog. I' dynamically creating the dialog & alert on a listitem click. It's working fine apart from the radio button IDs are incrementing each time the alert is shown (if I hit cancel then…
0
votes
2 answers

Radiobutton Android

I'm developing simple BMI calculator and since i added the influence of gender on my code with radio buttons the AVD stops unexpectedly. The problem is on the InterpretIMC function, i believe the ID of the radiobutton is not reading, don't know…
0
votes
1 answer

RadioButton inside ListView gives IllegalStateException

I wanted to have RadioButton inside ListView, the problem is that every RadioButton populated in the ListView, has different RadioGroup since all of them can be selected. I want only one item to be selected and set its position's checkFlag to true…
0
votes
1 answer

Radiogroup of ToggleButtons inside ArrayAdapter

I want to set a RadioGroup of ToggleButtons in my ArrayAdapter. I have two options in my list so when I select a ToggleButton to turn on I want the other to be turned off. Here is my ArrayAdapter code: public class MyAdapter extends…
BigT
  • 1,413
  • 5
  • 24
  • 52
0
votes
1 answer

Error in selecting a RadioButton from a RadioGroup in a Dialog view

I have a dialog view in which I have a RadioGroup from which I have selected a checked RadioButton... but it shows the following error: 01-28 14:24:02.833: E/AndroidRuntime(4186): FATAL EXCEPTION: main 01-28 14:24:02.833: E/AndroidRuntime(4186):…
0
votes
1 answer

how to group multiple radio button under radio group

i have a simple Activity, what i wanted to do is display 6 radio button in a single radio group xml
user2493303
  • 103
  • 3
  • 7
-1
votes
1 answer

Radio buttons looses values when scrolling in RecyclerView

Please help me spot the bug! I have read numerous posts here on this issue but I can't get mine to work. To me it looks like I'm doing it according to the other solutions but I'm missing something. I have a survey implemented as a question with 3…
-1
votes
1 answer

How to save the state of a radio group?

I want the user to have the same radio button checked which he had previously checked before the app was closed. This is my source code package com.example.myapplication; import android.support.v7.app.AppCompatActivity; import…
Venda
  • 167
  • 1
  • 4
  • 15
-1
votes
5 answers

Android Radio Group alignment over buttons in relative layout

I am unable to position my radio group over a button. It goes back of the button in relative layout. What I want is a radio group over a button. I have added the output of the code. What I want is to bring the radio group over the 2 buttons. Can…
-1
votes
1 answer

Multiple RadioGroup onCheckedChanged

This is my first time doing radio groups. Im trying to save the values from 3 groups to Shared Prefs. It works fine with one group, but once I try to add 2 more, all the pref values are just the last group in the form. Im not sure what to do to use…
ValhallaSkies
  • 61
  • 1
  • 12
-1
votes
2 answers

How can i add RadioButton to the RadioGroup by java?

It maybe a very simple question but i am beginner in Android please help with it. i have created two RadioButtons in XML without RadioGroup and in MainActivity.java created a RadioGroup, how can i add both RadioButtons in that RadioGroup? Code is…
-1
votes
1 answer

Error Adding radio button to radio group - Removeview()

rd1 = (RadioButton) findViewById(R.id.rd1); rd2 = (RadioButton) findViewById(R.id.rd2); rd3 = (RadioButton) findViewById(R.id.rd3); rd4 = (RadioButton) findViewById(R.id.rd4); RadioGroup rg = new…
-1
votes
1 answer

Create radio buttons in RadioGroup in custom adapter

I creating in adapter radio buttons as follows: @Override public View getView(int position, View convertView, ViewGroup parent) { View vi = convertView; if (vi == null) { LayoutInflater li = (LayoutInflater)…
-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 2 3
20
21