Header Ads

Header ADS

practical 2: 1.create an android application to design screens using different layouts and ui ,button,eddit text,text view,radio button,etc ?

 <?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    tools:context="com.example.studytonightandroid.MainActivity" >

 

    <TextView

        android:id="@+id/tvRg"

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_alignParentTop="true"

        android:layout_centerHorizontal="true"

        android:gravity="center"

        android:text="Rate This Lesson"

        android:textAppearance="?android:attr/textAppearanceMedium" />

    <RadioGroup

        android:layout_width="match_parent"

        android:layout_height="wrap_content"

        android:layout_below="@+id/tvRg"

        android:layout_centerHorizontal="true"

        android:orientation="horizontal"

        android:showDividers="beginning|middle|end"

        android:layout_marginTop="10dp"

        android:id="@+id/radioGroup" >

        <RadioButton

            android:id="@+id/rb1"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="EXCELLENT"

            android:checked="false" />

        <RadioButton

            android:id="@+id/rb2"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="GOOD"

            android:checked="true" />

        <RadioButton

            android:id="@+id/rb3"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="OKAY"

            android:checked="false" />

        <RadioButton

            android:id="@+id/rb4"

            android:layout_width="wrap_content"

            android:layout_height="wrap_content"

            android:text="POOR"

            android:checked="false" />

    </RadioGroup>

    <Button

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:text="SUBMIT"

        android:id="@+id/btnSubmit"

        android:layout_below="@+id/radioGroup"

        android:layout_centerHorizontal="true"

        android:layout_marginTop="10dp"/>

       

</RelativeLayout>

No comments

Powered by Blogger.