Android ui part 2

  • View
    129

  • Download
    1

  • Category

    Career

Preview:

Citation preview

AndroidAdvance UI - Part 2

Previous Sessions

ListView - more customization, GridView

More UI - CheckBox, RadioButton, ProgressBar, Pickers, WebView

Today’s agenda

Dialogs

Importance of Good UI

Building UI - basics revisited

Building Beautiful UI

Animations

Hardwares and Sensors

Dialogs

Dialogs

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.

***

Why Good UI is Important

Smooth performance.

Attracts users and keeps them.

Does not irritate users.

Does what is expected.

Beauty is Important

“No matter how useful or how good your app is, if its UI is not awesome it will have very few chances of remaining there in your user’s device.”

Bad UI =

Bad UI

Building UI - revisiting basics

Building UI - revisiting basics

A layout is combination of ‘ViewGroups’ and ‘Views’.

ViewGroup holds Views (and other ViewGroups) objects.

Every view component is either View or ViewGroup.

● Button, TextView, ImageView, EditText → View

● LinearLayout, RelativeLayout, ListView, RadioGroup → ViewGroup

Building UI - revisiting basics

Building UI - revisting basics

Building UI - revisiting basics

Building UI - revising basics

Creating beautiful UI

Change view in Java

Create custom components

Styles and themes

Custom drawables

Creating and changing UI in Java

Styles and Themes

Style:

“Collection of properties that define the look and format of a View component like color, font size and background color.”

Styles and Themes

Themes:

“A Theme is a ‘Style’ applied to whole Activity or Application.”

<application android:theme="@style/CustomTheme">

<style name="CustomTheme" parent="android:Theme.Light">

<item name="android:windowBackground">@color/custom_theme_color</item>

<item name="android:colorBackground">@color/custom_theme_color</item>

</style>

***

Using Third Party Libraries

Using Third Party Libraries

Create your own customized UI components and reuse them.

Use third party libraries created by expert developers.

● Github

● AndroidArsenal.com

● AndroidWeekly.net

● Jake Wharton

● ...and many more(Just Google it)

Animations

View Animations - old and simple

Property Animations - New, useful, realistic, comlex

● The Object to animate, the property, the values

● Can change different properties: int, float, color

● Animation set - mix different animations

● Animation listener

● Interpolator - Accelerate, Bounce, Linear etc.

Hardware

Camera

GPS

Speakers/ Audio Jack

Mic

Screen

Charging point/ usb port

Power Button

Wi-fi

Hardware

Volume Button

Battery

Sensors

● Light sensor

● Proximity sensor

● Motion sensors - accelerometer, gravity sensors

● Orientation sensors

Finger scanner

About Me

Paramvir Singh, Android Developer and Trainer

paramvir.singh88@gmail.com

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

Recommended