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

How to nest a RadioGroup with dynamic lists of RadioButton inside each row/item of a RecyclerView

I need a layout like this: The Red titles are the first level array from dish_options and the RadioButtons are a populated from an array itemsinside dish_options of the json: As you may notice the dish_options is an array, which might have many…
-1
votes
2 answers

Cannot resolve method getText for a RadioGroup

I am trying to have the user fill out a form then those fields auto-populate into an email. I was able to convert the EditText to strings as well as the spinner, but I am confused as to how to do it with RadioGroup. I want the text from the button…
-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
2 answers

Unfortunately , appname has Stopped

I am Trying to make a simple android program that starts the mainActivity and when the user clicks on the button the secondActivity Opens and shows a radio Group with three radio Buttons. When the user clicks on the radio button and press the button…
Akshay
  • 35
  • 2
  • 10
-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
2 answers

I am unable to create Shared Preference file

I am unable to create Shared Preference file I have been struggling with this for 2 days please help,I am new here.In my app I am having 15 question each on different screens and I want to store the text of the option selected so that I can use it…
-1
votes
1 answer

android layout radiogroup position

I have radiogroup :
RaQushka
  • 1
  • 2
-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

I want to add radiobutton programatically and set first item being selected?

Here is my code which I created bunch of radio buttons from my Json. for (int i = 0; i < level_array_list.size(); i++) { RadioButton radioButton = new RadioButton(getActivity()); radioButton.setText(level_array_list.get(i).getLevelName()); …
user7240797
-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
1 answer

i have two table in which i have to store data but i can't able to store data in second table

i have to two table "OWNER" and "USER" on selecting the first radio button it save the data on user table and on selecting second radio button data will be save on owner table database helper class which contain the function to create the user…
inyee
  • 435
  • 4
  • 12
-2
votes
1 answer

Android: Why is the RadioButton returning a NULL value?

I created a RadioGroup to enable the gender selection. Here's the part of the XML file that declares the RadioGroup and the RadioButtons.
MarshallLee
  • 1,290
  • 4
  • 23
  • 42
-3
votes
1 answer

I need recomendations for using two radiogroups and one button

Im working in a app that the main layout is made of two RadioGroups in different colums, and one button. The user of the app have to choose one option of each RadioGroup, and when he/she clicks the button, i need to open respective layout with the…
-3
votes
3 answers

getting error in android application: Attempt to invoke interface method on a null object reference

I have Three radio buttons inside radiogroup and want, when user check any radio button it must be remain checked until user check any other button (either user close the app or not) and for this purpose I has used sharedPreferences to store this…
-3
votes
2 answers

how can we arrange radio group's button as we want. I want 2 radio buttons in a row and other two radio buttons in next row.

how can we arrange radio group's button as we want.. i don't want to arrange horizontally or vertically.. i want 2 radio buttons in a row and other two radio buttons in next row.. please help thank you in advance...
Manav Patadia
  • 848
  • 7
  • 12
1 2 3
20
21