Developing and Designing Multiscreen Android apps

2,348 views

Published on

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.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,348
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
53
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

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

×