SlideShare a Scribd company logo
2
Most read
6
Most read
8
Most read
1
Activity, Intent & Layout
• Introduction to Activity
• Activity life cycle
• Introduction to Intent
• Types of Intent(Implicit and Explicit Intent)
• Layout Manager
• View and View Group
• Linear Layout
• Relative Layout
• Table Layout
• Grid Layout
• Constraint Layout
• Frame Layout
• Scroll Layout
2
Activity, Intent & Layout
2.1 Introduction to Activity & 2.2 Activity life cycle
 Activities : An activity is usually
a single screen that the user sees on
the device at one time.
 Starting state
 Running state
 Paused state
 Stopped state
 Destroyed state
3
Activity, Intent & Layout
 Intents :
Intents are messages that are sent among the major building blocks. They trigger an
activity to start up, tell a service to start or stop, or are simply broadcasts.
4
Activity, Intent & Layout
Layout Manager
• A layout defines the structure for a user
interface in your app, such as in an activity.
• All elements in the layout are built using a
hierarchy of View and ViewGroup objects.
• A View usually draws something the user
can see and interact with.
• Whereas a ViewGroup is an invisible
container that defines the layout structure
or View and other ViewGroup objects, as
shown in figure
5
Activity, Intent & Layout
All the elements in a layout are built using a hierarchy of View and ViewGroup objects.
• View
 A View is defined as the user interface which is used to create interactive UI
components such as TextView, ImageView, EditText, RadioButton, etc., and is
responsible for event handling and drawing.
 They are Generally Called Widgets.
 A ViewGroup act as a base class for layouts
and layouts parameters that hold other
 Views or ViewGroups and to define the
layout properties.
 They are Generally Called layouts.
6
Activity, Intent & Layout
Types of Android Layout
1. Android Linear Layout
2. Android Relative Layout
3. Android Constraint Layout
4. Android Frame Layout
5. Android Table Layout
6. Android Web View
7. Android ListView
8. Android Grid View
7
Activity, Intent & Layout
Layout Attributes
Each layout has a set of attributes which define the visual properties of that layout.
1. android:id
2. android:layout_width
3. android:layout_height
4. android:layout_marginTop
5. android:layout_marginBottom
6. android:layout_marginLeft
7. android:layout_marginRight
8. android:layout_gravity
1. android:layout_weight
2. android:layout_x
3. android:layout_y
4. android:layout_width
5. android:paddingLeft
6. android:paddingRight
7. android:paddingTop
8. android:paddingBottom
8
Activity, Intent & Layout
Here width and height are the dimension of the layout/view which can be specified in
terms of dp (Density-independent Pixels), sp ( Scale-independent Pixels), pt ( Points
which is 1/72 of an inch), px( Pixels), mm ( Millimeters) and finally in (inches).
You can specify width and height with exact measurements but more often, you will
use one of these constants to set the width or height −
android:layout_width=wrap_content tells your view to size itself to the dimensions
required by its content.
android:layout_width=fill_parent tells your view to become as big as its parent view.
Prof. Shalmali Randive 9
Activity, Intent & Layout

More Related Content

PPTX
01.2 Layouts and resources for the UI.pptx
PPTX
Unit 2 part for information technology1 4.pptx
PPTX
Android Apps Development Basic
PDF
Android session 2
PPTX
WMP_MP02_revd(10092023).pptx
PPTX
Notes Unit3.pptx
PPTX
WMP_MP02_revd_03(10092023).pptx
PDF
Android ui layout
01.2 Layouts and resources for the UI.pptx
Unit 2 part for information technology1 4.pptx
Android Apps Development Basic
Android session 2
WMP_MP02_revd(10092023).pptx
Notes Unit3.pptx
WMP_MP02_revd_03(10092023).pptx
Android ui layout

Similar to Android Introduction , Activity, Intent & Layout.pdf (20)

ODP
Android training day 2
PPTX
Unit2 Computer Architecture and Organisation
PDF
Android Lesson 2
PDF
Introduction to Andriod Studio Lecture note: Android Development Lecture 1.pdf
PPTX
Android User Interface
PPTX
Android bootcamp-day1
PDF
Android Application Development - Level 1
PPTX
Android application development
PDF
Android Introduction
PDF
04 user interfaces
PPTX
Android Training in Chandigarh
PPTX
Android apps development
PPTX
hema ppt (2).pptx
PPTX
PDF
Mobile Application Development -Lecture 07 & 08.pdf
PPTX
W1_Lec01_Lec02_Layouts.pptx
PPT
Android Presentation for fundamental.ppt
PPTX
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
PPTX
mobile application development -unit-3-
PPT
android layouts
Android training day 2
Unit2 Computer Architecture and Organisation
Android Lesson 2
Introduction to Andriod Studio Lecture note: Android Development Lecture 1.pdf
Android User Interface
Android bootcamp-day1
Android Application Development - Level 1
Android application development
Android Introduction
04 user interfaces
Android Training in Chandigarh
Android apps development
hema ppt (2).pptx
Mobile Application Development -Lecture 07 & 08.pdf
W1_Lec01_Lec02_Layouts.pptx
Android Presentation for fundamental.ppt
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
mobile application development -unit-3-
android layouts
Ad

Recently uploaded (20)

PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
Presentation on HIE in infants and its manifestations
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Pharma ospi slides which help in ospi learning
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
STATICS OF THE RIGID BODIES Hibbelers.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
O7-L3 Supply Chain Operations - ICLT Program
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Final Presentation General Medicine 03-08-2024.pptx
A systematic review of self-coping strategies used by university students to ...
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Anesthesia in Laparoscopic Surgery in India
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Chinmaya Tiranga quiz Grand Finale.pdf
Presentation on HIE in infants and its manifestations
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Microbial disease of the cardiovascular and lymphatic systems
102 student loan defaulters named and shamed – Is someone you know on the list?
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Pharma ospi slides which help in ospi learning
human mycosis Human fungal infections are called human mycosis..pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Ad

Android Introduction , Activity, Intent & Layout.pdf

  • 1. 1 Activity, Intent & Layout • Introduction to Activity • Activity life cycle • Introduction to Intent • Types of Intent(Implicit and Explicit Intent) • Layout Manager • View and View Group • Linear Layout • Relative Layout • Table Layout • Grid Layout • Constraint Layout • Frame Layout • Scroll Layout
  • 2. 2 Activity, Intent & Layout 2.1 Introduction to Activity & 2.2 Activity life cycle  Activities : An activity is usually a single screen that the user sees on the device at one time.  Starting state  Running state  Paused state  Stopped state  Destroyed state
  • 3. 3 Activity, Intent & Layout  Intents : Intents are messages that are sent among the major building blocks. They trigger an activity to start up, tell a service to start or stop, or are simply broadcasts.
  • 4. 4 Activity, Intent & Layout Layout Manager • A layout defines the structure for a user interface in your app, such as in an activity. • All elements in the layout are built using a hierarchy of View and ViewGroup objects. • A View usually draws something the user can see and interact with. • Whereas a ViewGroup is an invisible container that defines the layout structure or View and other ViewGroup objects, as shown in figure
  • 5. 5 Activity, Intent & Layout All the elements in a layout are built using a hierarchy of View and ViewGroup objects. • View  A View is defined as the user interface which is used to create interactive UI components such as TextView, ImageView, EditText, RadioButton, etc., and is responsible for event handling and drawing.  They are Generally Called Widgets.  A ViewGroup act as a base class for layouts and layouts parameters that hold other  Views or ViewGroups and to define the layout properties.  They are Generally Called layouts.
  • 6. 6 Activity, Intent & Layout Types of Android Layout 1. Android Linear Layout 2. Android Relative Layout 3. Android Constraint Layout 4. Android Frame Layout 5. Android Table Layout 6. Android Web View 7. Android ListView 8. Android Grid View
  • 7. 7 Activity, Intent & Layout Layout Attributes Each layout has a set of attributes which define the visual properties of that layout. 1. android:id 2. android:layout_width 3. android:layout_height 4. android:layout_marginTop 5. android:layout_marginBottom 6. android:layout_marginLeft 7. android:layout_marginRight 8. android:layout_gravity 1. android:layout_weight 2. android:layout_x 3. android:layout_y 4. android:layout_width 5. android:paddingLeft 6. android:paddingRight 7. android:paddingTop 8. android:paddingBottom
  • 8. 8 Activity, Intent & Layout Here width and height are the dimension of the layout/view which can be specified in terms of dp (Density-independent Pixels), sp ( Scale-independent Pixels), pt ( Points which is 1/72 of an inch), px( Pixels), mm ( Millimeters) and finally in (inches). You can specify width and height with exact measurements but more often, you will use one of these constants to set the width or height − android:layout_width=wrap_content tells your view to size itself to the dimensions required by its content. android:layout_width=fill_parent tells your view to become as big as its parent view.
  • 9. Prof. Shalmali Randive 9 Activity, Intent & Layout