[go: up one dir, main page]

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

Program 1 - R

The document outlines the creation of a simple 'Hello World' application using Android development. It includes the XML layout file 'activity_main.xml' for the user interface, which displays the text 'Hello World!!', and the 'MainActivity.kt' file that sets up the activity. Additionally, a 'themes.xml' file is provided to define the application's theme.

Uploaded by

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

Program 1 - R

The document outlines the creation of a simple 'Hello World' application using Android development. It includes the XML layout file 'activity_main.xml' for the user interface, which displays the text 'Hello World!!', and the 'MainActivity.kt' file that sets up the activity. Additionally, a 'themes.xml' file is provided to define the application's theme.

Uploaded by

Siva Ranjini H
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Program 1

CREATING “HELLO WORLD” APPLICATION


activity_main.xml:

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

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">

<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!!"
android:textSize="24sp"
android:textColor="#000000" />
</LinearLayout>

MainActivity.kt:
package com.example.program_1

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity

class MainActivity : AppCompatActivity() {


override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
}

themes.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Program_1" parent="Theme.AppCompat.DayNight">

</style>
</resources>

You might also like