I have 3 xml source files like this:
XmlPullParser xmlR = params[0].getXml(R.xml.code_1);
XmlPullParser xmlR = params[0].getXml(R.xml.code_2);
XmlPullParser xmlR = params[0].getXml(R.xml.code_3);
And this is my radio button:
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/separator2"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:orientation="horizontal" >
<RadioButton android:id="@+id/code_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="code_1"
android:onClick="onRadioButtonClicked"
/>
<RadioButton
android:id="@+id/code_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="code_2"
android:onClick="onRadioButtonClicked"
/>
<RadioButton
android:id="@+id/code_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:onClick="onRadioButtonClicked"
android:text="code_3" />
</RelativeLayout>
How to select just one of the xml files with radio button? So, when I select one of radio button, the xml code_1 or xml code_2 or xml code_3 will be used.
Thanks.