Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • How to improve your selection criteria of your Android app using Radio button

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    Comment on it

    Radio Button
    A radio button is a two-states button that can be either checked or unchecked. They are normally used together in a RadioGroup. When several radio buttons live inside a radio group, checking one radio button unchecks all the others.
    Exmaple:-

    First create a layout

    <LinearLayout
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout&#95;width="match&#95;parent"
            android:layout&#95;height="wrap&#95;content"
            android:orientation="vertical"
            android:padding="5dp" >
       <RadioGroup
                android:id="@+id/genderRadioGroup
                android:layout&#95;width="match&#95;parent"
                android:layout&#95;height="wrap&#95;content"
                android:orientation="vertical" >
             <RadioButton
                    android:id="@+id/male"
                    android:layout&#95;width="wrap&#95;content"
                    android:layout&#95;height="wrap&#95;content"
                    android:text="Male" />
    
                <RadioButton
                    android:id="@+id/female"
                    android:layout&#95;width="wrap&#95;content"
                    android:layout&#95;height="wrap&#95;content"
                    android:text="Female" />
       </RadioGroup>
     <Button
                android:id="@+id/knowGender"
                android:layout&#95;width="wrap&#95;content"
                android:layout&#95;height="wrap&#95;content"
                android:layout&#95;gravity="center&#95;horizontal"
                android:layout&#95;marginTop="5dp"
                android:text="Know Gender" />
    </LinearLayout>
    
    Android

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: