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

disable few RadioButtons on AlertDialog

I am displaying RadioButtons in a Sample AlertDialog. AlertDialog levelDialog; final CharSequence[] items = {" Easy "," Medium "," Hard "," Very Hard "}; // Creating and Building the Dialog AlertDialog.Builder builder = new…
Jack
  • 223
  • 3
  • 13
0
votes
4 answers

how to create quiz section using radio group and textview dynamically?

"I want to create a quiz section inside fragment tab and the structure should be as…
0
votes
1 answer

Clearing RadioGroup inside a ListView

I have a custom ListView set by an ArrayAdapter. Each row has a TextView and 3 RadioButtons. The objects which populate the AdapterView look like this: public class MyItem { public String title = ""; public boolean rb1 = false; public…
Dusan
  • 3,284
  • 6
  • 25
  • 46
0
votes
0 answers

Change Text in header layout of the Expandable List when Child is clicked

what I actually need is when I click a radio button in the child view I want the text in that radio button to be set to the selected_child TextView in the header layout. I have tried many ways. But i cannot identify the parent view uniquely inside…
0
votes
2 answers

Activate or de activate recyclerview items

I have a fragment which contains a recyclerview and a floating action button. In recyclerview, each row contains a radio button set as disabled by default. my requirement is I need to enable these radio buttons in every row upon floating action…
0
votes
1 answer

Recyclerview with radio group select only yes or no

I have a recyclerview with two radio buttons in every row. One is for 'yes' and another for 'No'. I want to select only one radio button from each row at a time and get the value or the position of that radio button in an array list. In order to…
0
votes
0 answers

Set tag for newly(Runtime) created element

I'm creating radio buttons like this in a fragment programmatically in a for loop (i++) for (int i = 1; i < priceList.length(); i++) { JSONObject priceObj = (JSONObject) priceList.get(i); String catName =…
0
votes
3 answers

Remove border RadioButton?

Can I remove border of RadioButton and I have RadioButtons like bellow : I see a lot of question and I used from android:buttonTint="" and style ... but don't work .
user4813855
0
votes
0 answers

Programmatically check RadioButton

I have two radiobutton groups that need to be initialized when loading the screen, so I used this code: mVisibilityPublic.setChecked(true); But when I load the screen I get the following (first is the wrong behavior, second is the expected…
MichelReap
  • 5,630
  • 11
  • 37
  • 99
0
votes
3 answers

My App Crashes With List Radio Button

My application crashes when I click on a radio button. The radio Buttons are generated Dynamically. But, when I refer to that button it crashes. The crash occurs Here when the snackbar is shown. I believe when when I call the method getText for…
ama989
  • 463
  • 1
  • 5
  • 23
0
votes
1 answer

RadioButtons within a RadioGroup check/uncheck randomly in a ListView

I cannot crack this problem: I have a listview with 10 questions. For each question there are three answers (RadioButtons) that are organized within a RadioGroup. The problem is that everytime I scroll the list the RadioButtons randomly…
0
votes
3 answers

RadioButton Issue get checked when sending?

Having two RadioButtons and button send. When I click on the send button the 2 RadioButtons are checked. How to avoid this? enter image description here
0
votes
3 answers

How to Arrange RadioButtons Randomly in android?

I have a radioGroup and four radiobutton, I just Want to arrange these radiobuttons randomly whenever the program is running. Say i have radio buttons r1,r2,r3,r4 and a radiogroup. I want sometimes these radiobuttons arranged like r2,r3,r1,r4…
Shahin Ghasemi
  • 1,600
  • 1
  • 20
  • 38
0
votes
2 answers

Select only one radio button

I want to select just one radio button at a time, but after selecting one of them when I click on the other button they both are selected, what can I do to solve this problem. My MainActivity.java code is public class MainActivity extends…
0
votes
0 answers

irregularity in button background selector behavior

In my application, I have a number of fragments. The order of the fragments are shown in the below image: The App flow starts from A and then after clicking forward button in G, it again ends up at A. There is a RadioGroup containing 2 radio…