Multiscreen Development in Android

Manikantan K
Manikantan.k@samsung.com
@manikantan_k
Introducing DP
DP = Density Independent pixels
Also called DIP
•Introduced to declare and create UIs that are screen
size/...
Concept of DPs
resolution = number of pixels available in the display
density = how many pixels appear within a constant a...
Concept of DPs
Without device independence

With device independence
Concept of DPs
Density or dpi = Physical Size / Resolution
Baseline density in Android = 160
DIP or DP = Resolution / ( de...
A little about Density
Galaxy Nexus
4.65”

800x1280

316 dpi

1.
2.

7”

720x1280

Notes

Nexus 7

216 dpi

Higher density...
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 B...
Some resources
http://developer.android.com/guide/practices/screens_support.html
http://developer.android.com/design/index...
Nächste SlideShare
Wird geladen in …5
×

Developing and Designing Multiscreen Android apps

2.350 Aufrufe

Veröffentlicht am

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.

Veröffentlicht in: Technologie, Unterhaltung & Humor
0 Kommentare
1 Gefällt mir
Statistik
Notizen
  • Als Erste(r) kommentieren

Keine Downloads
Aufrufe
Aufrufe insgesamt
2.350
Auf SlideShare
0
Aus Einbettungen
0
Anzahl an Einbettungen
4
Aktionen
Geteilt
0
Downloads
53
Kommentare
0
Gefällt mir
1
Einbettungen 0
Keine Einbettungen

Keine Notizen für die Folie

Developing and Designing Multiscreen Android apps

  1. 1. Multiscreen Development in Android Manikantan K Manikantan.k@samsung.com @manikantan_k
  2. 2. Introducing DP DP = Density Independent pixels Also 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.
  3. 3. Concept of DPs resolution = 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
  4. 4. Concept of DPs Without device independence With device independence
  5. 5. Concept of DPs Density or dpi = Physical Size / Resolution Baseline density in Android = 160 DIP or DP = Resolution / ( density / 160 )
  6. 6. A little about Density Galaxy Nexus 4.65” 800x1280 316 dpi 1. 2. 7” 720x1280 Notes Nexus 7 216 dpi Higher density/ dpi = more data, more clarity. Two devices with same/similar resolution need not have same physical size and vice versa.
  7. 7. Screen sizes & Density buckets *Only a guideline
  8. 8. Designing for phones and tablets
  9. 9. Handling different sizes Explicitly declare in the manifest which screen sizes your application supports
  10. 10. Handling different sizes Provide different layouts for different screen sizes
  11. 11. Handling different sizes Provide different bitmap drawables for different screen densities
  12. 12. Handling different sizes Use qualifiers effectively <resources_name>-<qualifier>
  13. 13. Handling different sizes Some recommendations from Google
  14. 14. Tip Preview all screens via IDE
  15. 15. 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
  16. 16. Some resources http://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/understandingdensity-independence-android http://stefan222devel.blogspot.com/2012/10/android-screen-densitiessizes.html http://developer.android.com/tools/help/draw9patch.html

×