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

Android UI Layout Example

This document defines the layout of a sample Android application containing a TextView labeled "Hello World", a Button, and an ImageView. The TextView is centered at the top of the parent layout. The Button and ImageView are placed at absolute positions within the layout for preview purposes.

Uploaded by

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

Android UI Layout Example

This document defines the layout of a sample Android application containing a TextView labeled "Hello World", a Button, and an ImageView. The TextView is centered at the top of the parent layout. The Button and ImageView are placed at absolute positions within the layout for preview purposes.

Uploaded by

Udit Rana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, 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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
tools:layout_editor_absoluteX="151dp"
tools:layout_editor_absoluteY="255dp" />

<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:layout_editor_absoluteX="128dp"
tools:layout_editor_absoluteY="66dp"
tools:srcCompat="@tools:sample/avatars" />

</[Link]>

You might also like