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

Issues with Radio buttons in RadioGroup in android

My Activity has a RadioGroup with two Radio buttons and Save button which saves a value in String variable "type". First radio button will initialize type to "Fasting" and second button will initialize "type" to "Non fasting". If I select second…
0
votes
0 answers

Radio button whlie pressing back button and back again same activty

I have a problem , I have an activity in which i am showing a list view which having user image and radio button of different different user, while I am selecting radio button , it is selected and switch one to another. It is okay but problem is…
user3048165
  • 65
  • 12
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
4 answers

Radio Button Selection in Android

In my project I have two radio button under a radio group.By default the first radio button is selected.When first radio button is in selected state four checkboxes will be visible if second radio button is in selected state all four checkboxes will…
Barbie
  • 167
  • 1
  • 3
  • 11
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):…
-1
votes
1 answer

ListView position problem while scrolling

I'm developing an app with a form users will have to fill. The form has some textview, edittexts, a listview and two buttons. The listview consist of a textview and two radiobuttons. I populate the listview with a question and two radiobuttons in…
misterpresid
  • 35
  • 1
  • 8
-1
votes
5 answers

RadioButtons not displaying

I am doing an exercise from "Advanced Android Development Course". This code doesn't display RadioButtons:
Pochmurnik
  • 780
  • 6
  • 18
  • 35
-1
votes
3 answers

AppCompatRadioButton not shown

Since I want to use buttonTint on versions < 21, I need to switch from RadioButton to AppCompatRadioButton. Unfortunately the button is not shown on the device (Android 5.1). It's strange because the android:text of the AppCompatRadioButton works,…
Bevor
  • 8,396
  • 15
  • 77
  • 141
-1
votes
2 answers

Change visibility of spinner with radio button

I want to change visibility of spinners when I change radio button. If I do it like this both spinners are View.GONE and when I click on one of radio buttons, nothing happens, spinners remain View.GONE, not View.VISIBLE. I tried to place IF's into…
-1
votes
2 answers

Radio Button goes wrong in android

Sometimes when i want to select choices in radio buttons there is something wrong with radio buttons which i can select Two radios However sometimes is right as default way it must be worked. Here two sample in my application : Here's my Code : …
Shahin Ghasemi
  • 1,600
  • 1
  • 20
  • 38
-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)…