The document provides information about creating user interface elements like TextView, Button, and Spinner dynamically in Kotlin code. It explains how to define the elements in XML layout files and access them in Kotlin activities to set onClickListeners and other functionality. Key steps include modifying layout XML files, strings resources, and accessing elements and adding functionality in Kotlin files.
The Content helps those who wish to program mobile applications using android platform. The content has been used to conduct mobile application boot camps using android platform on different regions in Tanzania
Kotlin for Android App Development PresentationKnoldus Inc.
Discover the power of Kotlin for crafting dynamic and efficient Android applications. We explore Kotlin's rich features in "Kotlin for Android Application," showing how it improves readability and productivity for mobile developers. With this resource, you will learn how to create modern, reliable Android apps, from simple syntax to seamless integration with pre-existing Java code. Enhance your development experience by learning about the benefits of Kotlin's expressive syntax and minimal style. This session will help you make the most of your Android application development experience, regardless of your level of experience with Kotlin.
The Content helps those who wish to program mobile applications using android platform. The content has been used to conduct mobile application boot camps using android platform on different regions in Tanzania
Kotlin for Android App Development PresentationKnoldus Inc.
Discover the power of Kotlin for crafting dynamic and efficient Android applications. We explore Kotlin's rich features in "Kotlin for Android Application," showing how it improves readability and productivity for mobile developers. With this resource, you will learn how to create modern, reliable Android apps, from simple syntax to seamless integration with pre-existing Java code. Enhance your development experience by learning about the benefits of Kotlin's expressive syntax and minimal style. This session will help you make the most of your Android application development experience, regardless of your level of experience with Kotlin.
Android Application Development - Level 1Isham Rashik
Very basics of Android Application Development for the beginners who have no prior experience with programming. Can be used for hobby purpose as well as educational material for the academic purpose.
Those who want to be familiar with Android, can easily go through this document. It will help them to learn basics. It is also useful for those who are preparing for cracking android interviews as this document is short and precise.
This is a basic crash course for android development covers:
Android Studio,Hello World Application,Application Components,Application Resources,User Interface,Good UI,Play Store
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Android Application Development - Level 1Isham Rashik
Very basics of Android Application Development for the beginners who have no prior experience with programming. Can be used for hobby purpose as well as educational material for the academic purpose.
Those who want to be familiar with Android, can easily go through this document. It will help them to learn basics. It is also useful for those who are preparing for cracking android interviews as this document is short and precise.
This is a basic crash course for android development covers:
Android Studio,Hello World Application,Application Components,Application Resources,User Interface,Good UI,Play Store
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
1. Android Mobile App Development with Kotlin
Kotlin is multi-platform language, i.e. easily executable on a
Java Virtual Machine.
Kotlin is sponsored by Google, announced as one of the
official languages for Android Development in 2017.
2. TextView in Kotlin
Android TextView is simply a view that are used to display the text to the
user and optionally allow us to modify or edit it.
Following steps are used to create TextView in Kotlin:
1. Add a TextView in activity_main.xml file inside LinearLayout.
2. Add attributes like text, textColor, textSize, textStyle in the
activity_main.xml file.
3. Open MainActivity.kt file and set OnClickListener for the textView to
show the Toast message.
10. Modify the strings.xml file
We can add strings in the strings.xml file and use in the
other files easily by calling them with their names.
<resources>
<string name="app_name">TextViewInKotlin</string>
<string name="text_view">Arsi University</string>
<string name="text_on_click">COMPUTER SCIENCE Department</string>
</resources>
11. activity_main.xml fil
Open activity_main.xml file and create a TextView using id textView.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<!--EditText with id editText-->
<TextView
android:id="@+id/text_view_id"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/text_view"
android:textColor="#008000"
android:textSize="40dp"
android:textStyle="bold"/>
</LinearLayout>
12. How to reference Textview in .kt file
Open MainActivity.kt file and get the reference of TextView defined
in the layout file.
// finding the textView
val textView = findViewById(R.id.text_view_id) as TextView
Setting the on click listener to the button
textView?.setOnClickListener { Toast.makeText(this@MainActivity,
"COMPUTER SCIENCE Department", Toast.LENGTH_LONG).show() }
13. MainActivity.kt file
Open app/src/main/java/yourPackageName/MainActivity.kt
to get the reference of TextView.
package com.example.myfirstkotlinapp
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.TextView
import android.widget.Toast
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
//accessing our textview from layout
val textView = findViewById<TextView>(R.id.text_view_id) as TextView
textView?.setOnClickListener{ Toast.makeText(this@MainActivity,
R.string.text_on_click, Toast.LENGTH_LONG).show() }
}
}
15. Button in Android
In Android applications, a Button is a user interface that is
used to perform some action when clicked or tapped.
It is a very common widget in Android and developers often
use it.
The Class Hierarchy of the Button Class in Kotlin
18. Step by step demonstration of creating a Button
Step 1: Create a new project
1. Click on File, then New => New Project.
2. Choose “Empty Activity” for the project template.
3. Select language as Kotlin.
4. Select the minimum SDK as per your need.
Step 2: Modify the strings.xml file
Navigate to the strings.xml file under the “values” directory of
the resource folder. This file will contain all strings that are
used in the Application.
19. Example
<resources>
<string name="app_name">GfG | Button In Kotlin</string>
<string name="btn">Button</string>
<string name="message">Hello IT students!! This is a Button.</string>
</resources>
Step 3: Modify the activity_main.xml file
Add a button widget in the layout of the activity. Below is the code of
the activity_main.xml file which does the same.
20. Spinner in Kotlin
It is a view similar to a dropdown list which is used to select
one option from the list of options.
It provides an easy way to select one item from the list of
items and it shows a dropdown list of all values when we
click on it.
The default value of the android spinner will be the
currently selected value and by using the Adapter we can
easily bind the items to the spinner objects.
we populate our Spinner control with a list of items by using
an ArrayAdapter in our Kotlin file.
21. To use Spinner, we create a new project by following the below
steps:
1. Click on File, then New => New Project.
2. After that include the Kotlin support and click on next.
3. Select the minimum SDK as per convenience and click the next button.
4. Then select the Empty activity => next => finish.
24. Update strings.xml file
Updating the name of the application using the string tag.
Creating a list of the items which will be used in the
dropdown menu.
<resources>
<string name="app_name">SpinnerInKotlin</string>
<string name="selected_item">Selected item:</string>
<string-array name="Languages">
<item>Java</item>
<item>Kotlin</item>
<item>Swift</item>
<item>Python</item>
<item>Scala</item>
<item>Perl</item>
</string-array>
</resources>
25. Access Spinner in MainActivity.kt file
First, we declare a variable languages to access the strings items from the
strings.xml file.
val languages = resources.getStringArray(R.array.Languages)
then, we access the spinner and set ArrayAdaptor to control the list of
items.
val spinner = findViewById(R.id.spinner)
if (spinner != null) {
val adapter = ArrayAdapter(this,
android.R.layout.simple_spinner_item, languages)
spinner.adapter = adapter
26. Access Spinner in MainActivity.kt file
package com.examples.myfirstkotlinapp
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.*
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// access the items of the list
val languages =
resources.getStringArray(R.array.Languages)
// access the spinner
val spinner = findViewById<Spinner>(R.id.spinner)
if (spinner != null) {
val adapter = ArrayAdapter(this,
android.R.layout.simple_spinner_item,
languages)
spinner.adapter = adapter
spinner.onItemSelectedListener = object :
AdapterView.OnItemSelectedListener {
override fun onItemSelected(parent:
AdapterView<*>,
view: View,
position: Int, id: Long) {
Toast.makeText(this@MainActivity,
getString(R.string.selected_item) + " " +
"" + languages[position],
Toast.LENGTH_SHORT).show()
}
override fun onNothingSelected(parent:
AdapterView<*>) {
// write code to perform some action
}
}
}
}
}
30. Step 4: Accessing the button in the MainActivity
file
Add functionality of button in the MainActivity file. Here describe the
operation to display a Toast message when the user taps on the button.
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Button
import android.widget.Toast
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// storing ID of the button
// in a variable
val button = findViewById<Button>(R.id.button)
// operations to be performed
// when user tap on the button
button?.setOnClickListener()
{
// displaying a toast message
Toast.makeText(this@MainActivity, R.string.message, Toast.LENGTH_LONG).show() }
}
}
31. Android UI Layout
Android Layout defines the user interface that holds the UI
controls or widgets that will appear on the screen of an
android application or activity screen.
Widget is an application or a component of an interface that
enables a user to perform a function or access a service.
Every application is a combination of View and ViewGroup.
An android application contains a large number of activities.
Each activity is one page of the application.
Each activity contains multiple user interface components
and those components are the instances of the View and
ViewGroup.
All the elements in a layout are built using a
hierarchyof View and ViewGroup objects.
32. View
A View is defined as the user interface which is used to
create interactive UI components such as
TextView, ImageView, EditText, RadioButton
It is responsible for event handling and drawing, called
Widgets.
View
33. ViewGroup
A ViewGroup act as a base class for layouts and layouts
parameters that hold other Views or ViewGroups and to
define the layout properties:- called layouts.
34. UI Elements
The Android framework will allow us to use UI elements or
widgets in two ways:
Use UI elements in the XML file
Create elements in the Kotlin file dynamically
35. Layouts in Android UI Design
Layout Managers (or simply layouts) are extensions of the
ViewGroup class.
They are used to set the position of child Views within the
UI we are building.
By nesting layouts, we can create arbitrarily complex UIs
using a combination of layouts.
Layout classes in the Android SDK can be used, modified or
can create your own to make the UI for your Views,
Fragments and Activities.
You can display your contents effectively by using the right
combination of layouts.
The most commonly used layout classes that are found in
Android SDK includes LinearLayout, Relative Layout,
36. Linear Layout
It is a ViewGroup subclass, used to provide child View elements one by
one either in a particular direction either horizontally or vertically
based on the orientation property.
A vertical layout has a column of Views, whereas in a horizontal layout
there is a row of Views.
It supports a weight attribute for each child View that can control the
relative size of each child View within the available space.
37. Android Relative Layout
It is a ViewGroup subclass, used to specify the position of
child View elements relative to each other like (A to the
right of B) or relative to the parent (fix to the top of the
parent).
It is flexible than other native layouts as it lets us to define
the position of each child View relative to the other views
and the dimensions of the screen.
38. Types of Android Layout
Android Frame Layout: FrameLayout is a ViewGroup
subclass, used to specify the position of View elements it
contains on the top of each other to display only a single
View inside the FrameLayout.
39. Android Grid Layout
GridView is a ViewGroup that is used to display a scrollable
list of items in a grid view of rows and columns.
It was introduced in Android 4.0 (API level 14).
The Grid Layout used a rectangular grid of infinitely thin
lines to lay out Views in a series of rows and columns.
The Grid Layout is incredibly flexible and can be used to
greatly simplify layouts and reduce or eliminate the complex
nesting often required to construct UIs using the layouts
described before.
40. Types of Android Layout
Android Constraint Layout is a ViewGroup subclass, used to specify
the position of layout constraints for every child View relative to other
views present. A ConstraintLayout is similar to a RelativeLayout, but
having more power
Android Table Layout: TableLayout is a ViewGroup subclass, used to
display the child View elements in rows and columns.
Android Web View: WebView is a browser that is used to display the
web pages in our activity layout.
Android ListView: ListView is a ViewGroup, used to display scrollable
lists of items in a single column.
Each of above-mentioned layouts is designed to scale to suit the screen
size of the host device by avoiding the used of absolute co-ordinates of
the positions or predetermined pixel values. This makes the app
suitable for the diverse set of Android devices.
41.
42. Use UI Elements in the XML file
It is a layout similar to web pages.
The XML layout file contains at least one root element in
which additional layout elements or widgets can be added to
build a View hierarchy.
43. Use UI Elements in the XML file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http:// schemas.android.com/apk/res/android"
xmlns:tools="http:// schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<!--EditText with id editText-->
<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:hint="Input"
android:inputType="text"/>
<!--Button with id showInput-->
<Button
android:id="@+id/showInput"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="show"
android:backgroundTint="@color/colorPrimary"
android:textColor="@android:color/white"/>
</LinearLayout>
44. Load XML Layout File and its elements from an
Activity
When we have created the layout, we need to load the XML
layout resource from our activity onCreate() callback method and
access the UI element from the XML using findViewById.
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// finding the button
val showButton = findViewById<Button>(R.id.showInput)
// finding the edit text
val editText = findViewById<EditText>(R.id.editText)
45. Load XML Layout File and its elements from
an Activity
You can see from code on slide 11 and finds out that we are
calling our layout using the setContentView method in the
form of R.layout.activity_main.
During the launch of our activity, the onCreate() callback
method will be called by the android framework to get the
required layout for an activity.
46. Create elements in the Kotlin file Dynamically
We can create or instantiate UI elements or widgets during runtime
by using the custom View and ViewGroup objects programmatically in
the Kotlin file.
To create a layout using LinearLayout to hold an EditText and a
Button in an activity programmatically:-
import android.os.Bundle
import android.widget.Button
import android.widget.EditText
import android.widget.LinearLayout
import android.widget.Toast
import android.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
// create the button
val showButton = Button(this)
showButton.setText("Submit")
// create the editText
val editText = EditText(this)
val linearLayout = findViewById<LinearLayout>(R.id.l_layout)
linearLayout.addView(editText)
linearLayout.addView(showButton)
// Setting On Click Listener
showButton.setOnClickListener
{
// Getting the user input
val text = editText.text
// Showing the user input
Toast.makeText(this, text, Toast.LENGTH_SHORT).show()
}
}
}
50. • All activities must also implement the onCreate() method. This
method gets called when the activity object gets created, and it’s
used to perform basic setup such as what layout the activity is
associated with. This is done via a call to setContentView(). In the
example above, the code:
setContentView(R.layout.activity_main)
tells Android that this activity uses activity_main.xml as its layout.