SlideShare a Scribd company logo
1 of 24
Android User Interface
Android - UI Layouts
The basic building block for user interface is a View object which is
created from the View class and occupies a rectangular area on the
screen and is responsible for drawing and event handling. View is the
base class for widgets, which are used to create interactive UI
components like buttons, text fields, etc.
LAYOUT PARAMS
XML file having LinearLayout
Once your layout has created, you can load the layout resource from
your application code, in your Activity.onCreate() callback
implementation
Android Layout Types
• Linear Layout
• Relative Layout
• Table Layout
• Absolute Layout
• Frame Layout
• List View
• Grid View
Linear Layout
• LinearLayout is a view group that
aligns all children in a single
direction, vertically or
horizontally.
Relative Layout
• RelativeLayout is a view group
that displays child views in
relative positions.
Absolute Layout
• An Absolute Layout lets you
specify exact locations (x/y
coordinates) of its children.
Absolute layouts are less flexible
and harder to maintain than
other types of layouts without
absolute positioning.
List View
• ListView is a view group that
displays a list of scrollable items.
Grid View
• GridView is a ViewGroup that
displays items in a two-
dimensional, scrollable grid.
Table Layout
• TableLayout is a view that groups
views into rows and columns.
Frame Layout
• The FrameLayout is a
placeholder on screen that you
can use to display a single view.
Layout Attributes
• android:id
• android:layout_width
• android:layout_height
• android:layout_marginTop
• android:layout_gravity
• android:layout_weight
• android:layout_x
• android:paddingRight
• android:layout_width
Android - UI Controls
• Input controls are the interactive components in your app's user
interface. Android provides a wide variety of controls you can use in
your UI, such as buttons, text fields, seek bars, check box, zoom
buttons, toggle buttons, and many more.
vertical layout with a text view and a button
Android UI Controls
• TextView
• EditText
• AutoCompleteTextView
• Button
• ImageButton
• CheckBox
• ToggleButton
• RadioButton
Create UI Controls
• To create a UI Control/View/Widget you will have to define a
view/widget in the layout file and assign it a unique ID as follows −
Android - Event Handling
• Events are a useful way to collect data about a user's interaction
with interactive components of Applications.Like button presses or
screen touch etc. The Android framework maintains an event queue
as first-in, first-out (FIFO) basis. You can capture these events in your
program and take appropriate action as per requirements.
Android Event Management
• Event Listeners
• Event Listeners Registration
• Event Handlers
Event Listeners
• An event listener is an interface in the View class that contains a
single callback method. These methods will be called by the Android
framework when the View to which the listener has been registered is
triggered by user interaction with the item in the UI.
Event Listeners Registration
• Event Registration is the process by which an Event Handler gets
registered with an Event Listener so that the handler is called when
the Event Listener fires the event.
Event Handlers
• When an event happens and we have registered an event listener for
the event, the event listener calls the Event Handlers, which is the
method that actually handles the event.
Design By Md Shakib Hasan
Daffodil International University

More Related Content

What's hot

Android notification
Android notificationAndroid notification
Android notification
Krazy Koder
 
android activity
android activityandroid activity
android activity
Deepa Rani
 

What's hot (20)

Introduction to Android and Android Studio
Introduction to Android and Android StudioIntroduction to Android and Android Studio
Introduction to Android and Android Studio
 
Android notification
Android notificationAndroid notification
Android notification
 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
 
android activity
android activityandroid activity
android activity
 
Android terminologies
Android terminologiesAndroid terminologies
Android terminologies
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
Android Layout
Android LayoutAndroid Layout
Android Layout
 
Android - Android Intent Types
Android - Android Intent TypesAndroid - Android Intent Types
Android - Android Intent Types
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Development of Mobile Application -PPT
Development of Mobile Application -PPTDevelopment of Mobile Application -PPT
Development of Mobile Application -PPT
 
Android resources
Android resourcesAndroid resources
Android resources
 
Android intents
Android intentsAndroid intents
Android intents
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Introduction to Android development - Presentation
Introduction to Android development - PresentationIntroduction to Android development - Presentation
Introduction to Android development - Presentation
 
SQLite database in android
SQLite database in androidSQLite database in android
SQLite database in android
 
JAVA AWT
JAVA AWTJAVA AWT
JAVA AWT
 
Introduction to fragments in android
Introduction to fragments in androidIntroduction to fragments in android
Introduction to fragments in android
 
Java swing
Java swingJava swing
Java swing
 
Android Widget
Android WidgetAndroid Widget
Android Widget
 

Similar to Android User Interface

Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfMobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdf
AbdullahMunir32
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 application
Vu Tran Lam
 

Similar to Android User Interface (20)

Ui 5
Ui   5Ui   5
Ui 5
 
Notes Unit3.pptx
Notes Unit3.pptxNotes Unit3.pptx
Notes Unit3.pptx
 
04 user interfaces
04 user interfaces04 user interfaces
04 user interfaces
 
WMP_MP02_revd(10092023).pptx
WMP_MP02_revd(10092023).pptxWMP_MP02_revd(10092023).pptx
WMP_MP02_revd(10092023).pptx
 
Android Layout Tutorial | Android UI Design Explained | Edureka
Android Layout Tutorial | Android UI Design Explained | EdurekaAndroid Layout Tutorial | Android UI Design Explained | Edureka
Android Layout Tutorial | Android UI Design Explained | Edureka
 
ANDROID LAB MANUAL.doc
ANDROID LAB MANUAL.docANDROID LAB MANUAL.doc
ANDROID LAB MANUAL.doc
 
Android Lesson 2
Android Lesson 2Android Lesson 2
Android Lesson 2
 
WMP_MP02_revd_03(10092023).pptx
WMP_MP02_revd_03(10092023).pptxWMP_MP02_revd_03(10092023).pptx
WMP_MP02_revd_03(10092023).pptx
 
hema ppt (2).pptx
hema ppt (2).pptxhema ppt (2).pptx
hema ppt (2).pptx
 
W1_Lec01_Lec02_Layouts.pptx
W1_Lec01_Lec02_Layouts.pptxW1_Lec01_Lec02_Layouts.pptx
W1_Lec01_Lec02_Layouts.pptx
 
Mobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdfMobile Application Development -Lecture 07 & 08.pdf
Mobile Application Development -Lecture 07 & 08.pdf
 
Android Training in Chandigarh
Android Training in ChandigarhAndroid Training in Chandigarh
Android Training in Chandigarh
 
"Android" mobilių programėlių kūrimo įvadas #2
"Android" mobilių programėlių kūrimo įvadas #2"Android" mobilių programėlių kūrimo įvadas #2
"Android" mobilių programėlių kūrimo įvadas #2
 
Android training day 2
Android training day 2Android training day 2
Android training day 2
 
mobile application development -unit-3-
mobile application development  -unit-3-mobile application development  -unit-3-
mobile application development -unit-3-
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 application
 
Android user interface design-chapter13
Android user interface design-chapter13Android user interface design-chapter13
Android user interface design-chapter13
 
Android UI Fundamentals part 1
Android UI Fundamentals part 1Android UI Fundamentals part 1
Android UI Fundamentals part 1
 
Android Introduction , Activity, Intent & Layout.pdf
Android Introduction , Activity, Intent & Layout.pdfAndroid Introduction , Activity, Intent & Layout.pdf
Android Introduction , Activity, Intent & Layout.pdf
 
Android views and layouts-chapter4
Android views and layouts-chapter4Android views and layouts-chapter4
Android views and layouts-chapter4
 

Recently uploaded

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 

Recently uploaded (20)

College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 

Android User Interface

  • 2. Android - UI Layouts The basic building block for user interface is a View object which is created from the View class and occupies a rectangular area on the screen and is responsible for drawing and event handling. View is the base class for widgets, which are used to create interactive UI components like buttons, text fields, etc.
  • 4. XML file having LinearLayout
  • 5. Once your layout has created, you can load the layout resource from your application code, in your Activity.onCreate() callback implementation
  • 6. Android Layout Types • Linear Layout • Relative Layout • Table Layout • Absolute Layout • Frame Layout • List View • Grid View
  • 7. Linear Layout • LinearLayout is a view group that aligns all children in a single direction, vertically or horizontally.
  • 8. Relative Layout • RelativeLayout is a view group that displays child views in relative positions.
  • 9. Absolute Layout • An Absolute Layout lets you specify exact locations (x/y coordinates) of its children. Absolute layouts are less flexible and harder to maintain than other types of layouts without absolute positioning.
  • 10. List View • ListView is a view group that displays a list of scrollable items.
  • 11. Grid View • GridView is a ViewGroup that displays items in a two- dimensional, scrollable grid.
  • 12. Table Layout • TableLayout is a view that groups views into rows and columns.
  • 13. Frame Layout • The FrameLayout is a placeholder on screen that you can use to display a single view.
  • 14. Layout Attributes • android:id • android:layout_width • android:layout_height • android:layout_marginTop • android:layout_gravity • android:layout_weight • android:layout_x • android:paddingRight • android:layout_width
  • 15. Android - UI Controls • Input controls are the interactive components in your app's user interface. Android provides a wide variety of controls you can use in your UI, such as buttons, text fields, seek bars, check box, zoom buttons, toggle buttons, and many more.
  • 16. vertical layout with a text view and a button
  • 17. Android UI Controls • TextView • EditText • AutoCompleteTextView • Button • ImageButton • CheckBox • ToggleButton • RadioButton
  • 18. Create UI Controls • To create a UI Control/View/Widget you will have to define a view/widget in the layout file and assign it a unique ID as follows −
  • 19. Android - Event Handling • Events are a useful way to collect data about a user's interaction with interactive components of Applications.Like button presses or screen touch etc. The Android framework maintains an event queue as first-in, first-out (FIFO) basis. You can capture these events in your program and take appropriate action as per requirements.
  • 20. Android Event Management • Event Listeners • Event Listeners Registration • Event Handlers
  • 21. Event Listeners • An event listener is an interface in the View class that contains a single callback method. These methods will be called by the Android framework when the View to which the listener has been registered is triggered by user interaction with the item in the UI.
  • 22. Event Listeners Registration • Event Registration is the process by which an Event Handler gets registered with an Event Listener so that the handler is called when the Event Listener fires the event.
  • 23. Event Handlers • When an event happens and we have registered an event listener for the event, the event listener calls the Event Handlers, which is the method that actually handles the event.
  • 24. Design By Md Shakib Hasan Daffodil International University