As you can see, I got a simple RadioGroup and its options.
<RadioGroup
android:id="@+id/radio_report_problems"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="20dp" >
<RadioButton
android:id="@+id/radiooption_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/report_problem_rd_opt_1" />
<RadioButton
android:id="@+id/radiooption_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/report_problem_rd_opt_2" />
.....
</RadioGroup>
My problem is that the bullet sits at the middle of the text, instead of starting at the first line
Without using tableView, or linearLayout, is there a simple way to achieve this using RadioGroup only?
Thank you.
i used
android:gravity="top"
and it works
see this: enter image description here
You could extend RadioButton
and override the onDraw
method to draw the button aligned with the top of the text. The code for drawing that button is actually inside of CompoundButton
(RadioButton
extends from that), so that should be your starting point for how to draw the button. Source
Personally I don't think there's anything wrong with the button aligning to the center, but that's beside the point.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With