Module II - Introduction To Android Activities and Layouts
Module II - Introduction To Android Activities and Layouts
By,
Dr. DHAWALESWAR RAO
Internal Details of Hello Android Example
Android application contains different components such as java source code, string resources, images, manifest file, apk
file etc. Let's understand the project structure of android application.
- Activity is a java class that creates and default window on the screen where we can place different components
such as Button, EditText, TextView, Spinner etc. It provides life cycle methods for activity such as onCreate,
onStop, OnResume etc.
- The onCreate method is called when Activity class is first created.
- The setContentView(R.layout.activity_main) gives information about our layout resource. Here, our layout
resources are defined in activity_main.xml file.
• An activity is the single screen in android
• The android Activity is the subclass of ContextThemeWrapper
class.
• By the help of activity, you can place all your UI components or
widgets in a single screen.