Existing five radio buttons in a row horizontally, then a little crowded, I intend to display two rows, the first row of three, two second row, so I joined the two first layout RadioGroup, but increases it found that after several radio buttons instead of a group, and each of which can be selected, is there any solution to it, or in what way can make a radio button to wrap it?<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
"RadioButtons have to be direct children of RadioGroup", see here and here discussion.
Multiple RadioGroup, then put them together yourself, such as < / a>.
Reply:
Thank you, the problem is solved, I really do not understand why when running google plus other design layout group, and sad to say with
Reply:
How to solve?
Reply:
Solution according to the first floor of
Reply:
Reply:
The method according to the first floor to be able to solve the newline problem, but can not the radio, and you can become a multiple choice
Reply:
Upstairs on the radio problem can not, in fact, there has also been a solution.
private OnCheckedChangeListener mOnCheckedChangeListener = new OnCheckedChangeListener () {
@ Override
public void onCheckedChanged (RadioGroup group, int checkedId) {
if (group == rg_skin_content1) {
rg_skin_content2.clearCheck ();
} Else if (group == rg_skin_content2) {
rg_skin_content1.clearCheck ();
}
}
};
Reply:
Sorry - not carefully read, this is the only solution
private OnCheckedChangeListener mOnCheckedChangeListener = new OnCheckedChangeListener () {
@ Override
public void onCheckedChanged (RadioGroup group, int checkedId) {
if (group! = null) {
if (group == rg_skin_content1) {
if (checkedId == R.id.rb_appearance_1 | | checkedId == R.id.rb_appearance_2 | | checkedId == R.id.rb_appearance_3 | | checkedId == R.id.rb_appearance_4) {
rg_skin_content2.clearCheck ();
group.check (checkedId);
}
} Else if (group == rg_skin_content2) {
if (checkedId == R.id.rb_appearance_5 | | checkedId == R.id.rb_appearance_6 | | checkedId == R.id.rb_appearance_7 | | checkedId == R.id.rb_appearance_8) {
rg_skin_content1.clearCheck ();
group.check (checkedId);
}
}
}
}
};
Reply:
Simply not feasible,
You call clearCheck
Will lead once again result in a call OnCheckedChangeListener
Then called again, the cycle call.
Must be wrong.
Reply:
Reply:
Played microcontroller interrupt should all know it, go first OnCheckedChangeListener
Is set to NULL, and other operations over again like a set back
Reply:
Oh, already solved. . . Is that what you gravedigger?
Reply:
That is how do you solve it? Urgently needed!
No comments:
Post a Comment