I am using RadioGroup with two radiobuttons in it. I want to show a a dialog popup with a button when a radiobutton is clicked but without checking the radiobutton and get it checked only when the button inside the dialog is pressed. Using onCheckedChangeListener()
already checks the radiobutton. I am trying to show the preview of theme before user applies it. How I can handle this situation?
Here is the xml just in case its needed:
<RadioGroup
android:id="@+id/checkButtonGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checkedButton="@+id/first"
android:orientation="horizontal">
<RadioButton
android:id="@+id/first"
android:layout_width="0dp"
android:layout_weight="0.5"
android:layout_height="100dp"
android:background="@drawable/theme_light_selector"
android:layout_margin="10dp"
android:button="@null"
android:text="Radio 1"/>
<RadioButton
android:id="@+id/second"
android:layout_width="0dp"
android:layout_weight="0.5"
android:background="@drawable/theme_light_selector"
android:layout_height="100dp"
android:layout_margin="10dp"
android:button="@null"
android:text="Radio 2"/>
</RadioGroup>