Thursday, 22 August 2013

Android radio group selection weird behaviour

Android radio group selection weird behaviour

I have a radio group with a strange behavior: At first no item is
selected, then I select the one on the left and I can change my selection
to the right one. However this is where the problem appears when switching
from right to left it just wont work. It stays in place. I have a few more
radio groups and they work just fine.
Here is the code:
<RadioGroup
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<RadioButton
android:id="@+id/radioButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:button="@drawable/radio_selector"
android:paddingLeft="5dp"
android:text="Persoana fizica"
android:textSize="12dp" />
<RadioButton
android:id="@+id/radioButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:button="@drawable/radio_selector"
android:paddingLeft="5dp"
android:text="Persoana juridica"
android:textSize="12dp" />
</RadioGroup>

No comments:

Post a Comment