engrjd91 0 Junior Poster in Training

I am creating an android application .. in my app.. one of the activity contains 2 radio buttons..i have 2 questions for it...

  1. How to select only one radio button at a time, what code will be written?
  2. How to decrease the size of the radio icon (Circular icon only, not text)?

I can show u my xml file..

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content">
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/textView3"
        style="@style/headings"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingBottom="30dp"
        android:text="Basic Electrical Engineering"
        android:textSize="25sp" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Number of Sessions"
        android:textSize="20sp" />

    <RadioButton
        android:id="@+id/radioButton1"
        android:layout_width="150dp"
        android:layout_height="40dp"
        android:text="1"
        android:textSize="16sp" />

    <RadioButton
        android:id="@+id/RadioButton01"
        android:layout_width="150dp"
        android:layout_height="40dp"
        android:text="2"
        android:textSize="16sp" />

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingBottom="5dp"
        android:paddingTop="15dp"
        android:text="Session(s) Duration"
        android:textSize="20sp" />

    <EditText
        android:id="@+id/editText1"
        android:layout_width="200dp"
        android:layout_height="wrap_content"
        android:ems="10"
        android:hint="example: 2 hours" >

        <requestFocus />
    </EditText>

    <TextView
        android:id="@+id/TextView01"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingBottom="5dp"
        android:paddingTop="15dp"
        android:text="Room"
        android:textSize="20sp" />

    <EditText
        android:id="@+id/EditText01"
        android:layout_width="200dp"
        android:layout_height="wrap_content"
        android:ems="10"
        android:hint="example: A" />

    <Button
        android:id="@+id/button2"
        style="?android:attr/buttonStyleSmall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="clip_vertical"
        android:gravity="center_vertical"
        android:text="Begin Attendance" />

</LinearLayout>
</ScrollView>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.