0% found this document useful (0 votes)
14 views1 page

Android Layout: Match Parent vs Wrap Content

The document is an XML layout for an Android registration screen using a ConstraintLayout. It includes a ScrollView containing a LinearLayout with a TextView for the title, an EditText for entering names, and a RadioGroup for selecting gender. The layout is designed to be responsive and adaptable to different screen sizes.

Uploaded by

Jado
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

Android Layout: Match Parent vs Wrap Content

The document is an XML layout for an Android registration screen using a ConstraintLayout. It includes a ScrollView containing a LinearLayout with a TextView for the title, an EditText for entering names, and a RadioGroup for selecting gender. The layout is designed to be responsive and adaptable to different screen sizes.

Uploaded by

Jado
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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

>
<[Link]
xmlns:android="[Link]
xmlns:app="[Link]
xmlns:tools="[Link]
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".registration">

<ScrollView
android:layout_width="409dp"
android:layout_height="729dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:layout_editor_absoluteX="1dp"
tools:layout_editor_absoluteY="1dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/textTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="REGISTRATION"/>
<EditText
android:id="@+id/EditNames"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Enter names"/>
<RadioGroup
android:id="@+id/radioGroupGender"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RadioButton
android:id="@+id/Gender_female"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="female"/>
<RadioButton
android:id="@+id/Gender_male"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="male"/>
</RadioGroup>

</LinearLayout>
</ScrollView>
</[Link]>

You might also like