18
Android Session 6 - UI

Android Session 6 - UI Part 1

Embed Size (px)

Citation preview

Page 1: Android Session 6 - UI Part 1

AndroidSession 6 - UI

Page 2: Android Session 6 - UI Part 1

Previous Sessions

Permissions

UI Components - ScrollView and ListView

Page 3: Android Session 6 - UI Part 1

Today’s agenda

ListView - more customization, GridView

More UI - CheckBox, ProgressBar, Pickers

...and Some more UI - WebView, Dialogs

Page 4: Android Session 6 - UI Part 1

ListView - Customization

Page 5: Android Session 6 - UI Part 1

ListView - Customization

Add ImageView, Buttons and other views in rows.

Change background, font sizes, font colors etc.

Add animations.

Page 6: Android Session 6 - UI Part 1

Animations

Page 7: Android Session 6 - UI Part 1

ListView - getView()

Inflate row layout

Get reference to the UI components in the row view (TextViews, ImageViews, Buttons)

Get the Item Object to be used for the row using ‘position’.

Fill the data from Object in the row views.

***

Page 8: Android Session 6 - UI Part 1

More UI - CheckBox

Page 9: Android Session 6 - UI Part 1

More UI - ProgressBar

Page 10: Android Session 6 - UI Part 1

More UI - Date Picker and Time Picker

Page 11: Android Session 6 - UI Part 1

WebView

To show HTML content in app.

To show a website url in your app.

Acts as a mini browser embedded in the app.

Page 12: Android Session 6 - UI Part 1

Dialogs

Page 13: Android Session 6 - UI Part 1

Dialogs

Page 14: Android Session 6 - UI Part 1

Dialogs

To show alert messages to user.

To ask for user confirmation before doing some critical task.

To ask user to select an option from given options.

***

Page 15: Android Session 6 - UI Part 1

Why Good UI is Important

Smooth performance.

Attracts users and keeps them.

Does not irritate users.

Does what is expected.

Page 16: Android Session 6 - UI Part 1

Hardware

Camera

GPS

Speakers/ Audio Jack

Mic

Screen

Charging point/ usb port

Power Button

Wi-fi

Page 17: Android Session 6 - UI Part 1

Hardware

Volume Button

Battery

Sensors

● Light sensor

● Proximity sensor

● Motion sensors - accelerometer, gravity sensors

● Orientation sensors

Finger scanner

Page 18: Android Session 6 - UI Part 1

About Me

Paramvir Singh, Android Developer and Trainer

[email protected]

https://in.linkedin.com/in/paramvir-singh-android-developer-b45b5321