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

Pr-4 hello word

The document provides an XML layout for an Android application that displays 'Hello World!' on the screen. It uses a ConstraintLayout to center a TextView with the specified text and size. The layout is designed to match the parent dimensions and position the text in the center of the screen.

Uploaded by

vaishnaviware005
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
9 views1 page

Pr-4 hello word

The document provides an XML layout for an Android application that displays 'Hello World!' on the screen. It uses a ConstraintLayout to center a TextView with the specified text and size. The layout is designed to match the parent dimensions and position the text in the center of the screen.

Uploaded by

vaishnaviware005
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 1

Develop a program to display Hello Word on screen.

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


<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
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!"
android:textSize="50dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

O/P:-

You might also like