0% found this document useful (0 votes)
44 views

Android UI Design

The document discusses Android UI design. It covers Android app structure and common UI patterns like top level views, detail views and the action bar. It also discusses standard UI components, supporting multiple device screens, views, layouts like LinearLayout and RelativeLayout, fragments, multimedia, themes and styles. The document uses examples and code snippets to illustrate key concepts in Android UI development.

Uploaded by

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

Android UI Design

The document discusses Android UI design. It covers Android app structure and common UI patterns like top level views, detail views and the action bar. It also discusses standard UI components, supporting multiple device screens, views, layouts like LinearLayout and RelativeLayout, fragments, multimedia, themes and styles. The document uses examples and code snippets to illustrate key concepts in Android UI development.

Uploaded by

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

Android UI Design ii

Android UI Design ii

1 Android UI Overview 1
Introduction.........................................................................................................................................................................................1
Android App Structure and UI patterns...............................................................................................................................................1
Top level view 2
Detail view 3
Action Bar 3
Standard components...........................................................................................................................................................................3
Multiple devices support.....................................................................................................................................................................7

2 Android UI: Understanding Views 10


Overview 10
Views 10
TextView component........................................................................................................................................................................12
ImageView component......................................................................................................................................................................14
Input controls 16
UI Events and Listeners.....................................................................................................................................................................22
UI Development................................................................................................................................................................................24
View and Adapters............................................................................................................................................................................27
Handling ListView events.................................................................................................................................................................32
Custom Adapter and View Holder pattern........................................................................................................................................34
Download the Source Code...............................................................................................................................................................37

3 Android UI: Layouts with View Groups and Fragments 38


Overview 38
Layout overview................................................................................................................................................................................38
LinearLayout 39
TableLayout 44
RelativeLayout 50
FrameLayout 55
GridLayout 55
Layout and multiple screen support..................................................................................................................................................55
Fragments 55
Fragment lifecycle 59
How to use fragments........................................................................................................................................................................61
FrameLayout and FragmentManager................................................................................................................................................64
Fragment Activity communication....................................................................................................................................................64
Inter fragment communication..........................................................................................................................................................66
Multiple screen support using fragments..........................................................................................................................................66
Android UI Design iv

Download the Source Code...............................................................................................................................................................71

4 Android UI: Adding Multimedia to an App 72


Overview 72
Multimedia API.................................................................................................................................................................................72
Using Android Camera......................................................................................................................................................................74
Graphics 77
Drawable 82
Shape drawable 83
State list 88
Nine-patch 91
Download the Source Code...............................................................................................................................................................95

5 Android UI: Themes and Styles 96


Introduction.......................................................................................................................................................................................96
Style definition..................................................................................................................................................................................97
Inheritance 97
Style properties 97
Creating and applying themes.........................................................................................................................................................100
Themes and platforms.....................................................................................................................................................................108
Conclusion 108
Download the Source Code.............................................................................................................................................................108

6 Android UI: Full Sample App 109


Introduction.....................................................................................................................................................................................109
App structure...................................................................................................................................................................................109
Item List with ListView and Object Model.....................................................................................................................................112
Multi-device support and layout considerations..............................................................................................................................116
Add item user interface layout........................................................................................................................................................118
Tag Color/Priority Spinner..............................................................................................................................................................120
Date and Time picker......................................................................................................................................................................122
Main Activity 125
Action bar 126
Styling the app.................................................................................................................................................................................129
Conclusion 132
Download the Source Code 132

You might also like