developing and designing multiscreen android apps

Post on 01-Nov-2014

1.222 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

A presentation to remind developers and designers the important points to consider while developing Android apps that work on different form factors, including phones and tablets. It also covers the concept of DPs.

TRANSCRIPT

Manikantan K

Manikantan.k@samsung.com@manikantan_k

Multiscreen Development in Android

Introducing DP

DP = Density Independent pixelsAlso called DIP

•Introduced to declare and create UIs that are screen size/resolution independent.•Helps to ensure interfaces work well across devices of different aspect ratio/ screen density etc.•In Android, refrain from using px for width/distance and other measurements. Always use DP.

Concept of DPsresolution = number of pixels available in the display

density = how many pixels appear within a constant area of the display, dots per inch = dpi

size = amount of physical space available for displaying an interface, screen's diagonal, inch

density-independent pixel = virtual pixel that is independent of the screen density, dp

Concept of DPs

With device independence

Without device independence

Concept of DPs

Density or dpi = Physical Size / ResolutionBaseline density in Android = 160

DIP or DP = Resolution / ( density / 160 )

A little about Density

Galaxy Nexus Nexus 7

4.65” 7”

720x1280 800x1280

316 dpi 216 dpi

Notes1. Higher density/ dpi = more data, more clarity.2. Two devices with same/similar resolution need not have same

physical size and vice versa.

Screen sizes & Density buckets

*Only a guideline

Designing for phones and tablets

Handling different sizes

Explicitly declare in the manifest which screen sizes your application supports

Handling different sizes

Provide different layouts for different screen sizes

Handling different sizes

Provide different bitmap drawables for different screen densities

Handling different sizes

Use qualifiers effectively<resources_name>-<qualifier>

Handling different sizes

Some recommendations from Google

Tip Preview all screens via IDE

Handling different sizes

Using 9-patch images helps you scale a graphic without distortion.Use 9 patch images for BG of Buttons, EditText etc

9-patch tool comes as a part of the Android SDK

Some resourceshttp://developer.android.com/guide/practices/screens_support.html

http://developer.android.com/design/index.html

http://blog.edwinevans.me/?p=131

http://blogs.captechconsulting.com/blog/steven-byle/understanding-density-independence-android

http://stefan222devel.blogspot.com/2012/10/android-screen-densities-sizes.html

http://developer.android.com/tools/help/draw9patch.html

top related