SlideShare uma empresa Scribd logo
1 de 25
Baixar para ler offline
SunLi@MrSunLi.com
                 http://MrSunLi.com




Supporting Multiple
Screens On Android
(covers 4.0)
Target Audiences


• Designer for graphics assets for Android devices

• Designer for graphics assets for Android apps

• Beginning developers for Android apps




                                                     2
Agenda


         •   Challenges
         •   Solutions
         •   Web resources
         •   Key takeaway

         • Technical details
             – Technical terms and
               concepts
             – Range of screens supported
             – Alternative graphics assets
               for different screen densities
             – Web resources


                                                3
Resolution independence and density
independence are critical challenges




                                       4
Resolution is well-managed by Android, but
density might blur graphics assets

                                     • ldpi = 120
                                        – 36 x 36 px


                                     • mdpi = 160
                                        – 48 x 48 px


                                     • hdpi = 240
  Screen snapshot on a hdpi device      – 72 x 72 px


                                     • xhdpi = 320
                                        – 96 x 96 px


                                                       5
Density can be managed by Android with
standard categories, although device display
panels are diversified

                    Wildfire   125 dpi


                    Xoom       149 dpi


                   Nexus S     235 dpi


                 Galaxy Nexus 316 dpi
                                               6
Density-independent pixel (dp) is a new virtual
unit for conceptual design


                        dp




                                                  7
Extra graphics assets with proper program
structure can resolve density challenge


   Android Devices      Device Dedicated Apps        Public Apps

Wallpaper, boot-up       App launcher icon, menu icon, background
animation, etc.         images, etc.

To design graphic assets against device         To assume dp/mdpi in
physical pixels as usual                        conceptual design

                                                To design four
                                                versions graphic
                                                assets (3:4:6:8 scaling
                                                ratio) for ldpi, mdpi,
                                                hdpi and xhdpi


                                                                          8
New Android Design site is official reference




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

Also can download official Android icon templates pack here
http://developer.android.com/guide/practices/ui_guidelines/icon_design.html#templatespack
                                                                                        9
Android Asset Studio can saving your time




                http://j.mp/androidassetstudio
                                                 10
Pencil with Android Stencils is a nice UI
prototyping tool




             http://pencil.evolus.vn
             http://code.google.com/p/android-ui-utils/
                                                          11
Key takeaway - public Android apps request
more graphics assets

                               • To assume dp/mdpi in
                                 conceptual design

                               • To design four versions
                                 graphic assets (3:4:6:8
                                 scaling ratio) for ldpi,
                                 mdpi, hdpi and xhdpi




   Case study for Angry Bird
                                                            12
Technical details …




                      13
Technical terms and concepts


• Density-independent pixel (dp)
   – A virtual pixel unit that you should use when defining UI layout, to
     express layout dimensions or position in a density-independent
     way.
   – The density-independent pixel is equivalent to one physical pixel on
     a 160 dpi screen, which is the baseline density assumed by the
     system for a "medium" density screen. At runtime, the system
     transparently handles any scaling of the dp units, as necessary,
     based on the actual density of the screen in use. The conversion of
     dp units to screen pixels is simple: px = dp * (dpi / 160). For
     example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels. You
     should always use dp units when defining your application's UI, to
     ensure proper display of your UI on screens with different densities.


                                                                        14
Technical terms and concepts cont.


• Screen size
   – Actual physical size, measured as the screen's diagonal. For
     simplicity, Android groups all actual screen sizes into four
     generalized sizes: small, normal, large, and extra large.
• Screen density
   – The quantity of pixels within a physical area of the screen; usually
     referred to as dpi (dots per inch). For simplicity, Android groups all
     actual screen densities into four generalized densities: low,
     medium,
     high, and
     extra high.


                                ~120dpi   ~160dpi    ~240dpi      ~320dpi


                                                                            15
Technical terms and concepts cont.


• Orientation
   – The orientation of the screen from the user's point of view. This is
     either landscape or portrait, meaning that the screen's aspect
     ratio is either wide or tall, respectively. Be aware that not only do
     different devices operate in different orientations by default, but the
     orientation can change at runtime when the user rotates the device.
• Resolution
   – The total number of physical pixels on a screen. When adding
     support for multiple screens, applications do not work directly
     with resolution; applications should be concerned only with screen
     size and density, as specified by the generalized size and density
     groups.



                                                                          16
Range of screens supported


•   xlarge screens   >   960 dp x 720 dp
•   large screens    >   640 dp x 480 dp
•   normal screens   >   470 dp x 320 dp
•   small screens    >   426 dp x 320 dp




• Note: The system bar in Android 3 and above reduces app
  space

                                                            17
Range of screens supported cont.




                                   18
Range of screens supported cont.




                                   19
Alternative graphics assets for different screen
densities

• The configuration qualifiers you can use for density-specific
  resources are ldpi (low), mdpi (medium), hdpi (high), and
  xhdpi (extra high). For example, bitmaps for high-density
  screens should go in drawable-hdpi/.
• By default, Android scales your bitmap drawables (.png, .jpg,
  and .gif files) and Nine-Patch drawables (.9.png files) so that
  they render at the appropriate physical size on each device. For
  example, if your application provides bitmap drawables only for
  the baseline, medium screen density (mdpi), then the system
  scales them up when on a high-density screen, and scales them
  down when on a low-density screen. This scaling can cause
  artifacts in the bitmaps. To ensure your bitmaps look their best,
  you should include alternative versions at different resolutions
  for different screen densities.

                                                                  20
Alternative graphics assets for different screen
densities cont.

• To create alternative bitmap drawables for different
  densities, you should follow the 3:4:6:8 scaling ratio
  between the four generalized densities. For example, if you
  have a bitmap drawable that's 48x48 pixels for medium-
  density screen (the size for a launcher icon), all the
  different sizes should be:
   –   36x36 for low-density
   –   48x48 for medium-density
   –   72x72 for high-density
   –   96x96 for extra high-density




                                                           21
Nine-patch graphics assets


• A NinePatchDrawable graphic is a stretchable bitmap
  image, which Android will automatically resize to
  accommodate the contents of the View in which you have
  placed it as the background. An example use of a
  NinePatch is the backgrounds used by standard Android
  buttons — buttons must stretch to accommodate strings of
  various lengths. A NinePatch drawable is a standard PNG
  image that includes an extra 1-pixel-wide border. It must be
  saved with the extension .9.png, and saved into the
  res/drawable/ directory of your project.



                                                            22
Free Android tool: SDK/tools/draw9patch




                                          23
DPI online calculator




                  http://www.pxcalc.com/
                                           24
Technical details for supporting multiple screens


• http://developer.android.com/guide/practices/screens_supp
  ort.html




                                                          25

Mais conteúdo relacionado

Mais procurados

Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentAly Abdelkareem
 
android activity
android activityandroid activity
android activityDeepa Rani
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The BasicsMike Desjardins
 
Android activity
Android activityAndroid activity
Android activityKrazy Koder
 
04 activities and activity life cycle
04 activities and activity life cycle04 activities and activity life cycle
04 activities and activity life cycleSokngim Sa
 
Introduction to Android, Architecture & Components
Introduction to  Android, Architecture & ComponentsIntroduction to  Android, Architecture & Components
Introduction to Android, Architecture & ComponentsVijay Rastogi
 
Android notification
Android notificationAndroid notification
Android notificationKrazy Koder
 
Android AIDL Concept
Android AIDL ConceptAndroid AIDL Concept
Android AIDL ConceptCharile Tsai
 
Android ui layout
Android ui layoutAndroid ui layout
Android ui layoutKrazy Koder
 
Android Development Slides
Android Development SlidesAndroid Development Slides
Android Development SlidesVictor Miclovich
 
Android animation
Android animationAndroid animation
Android animationKrazy Koder
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidzeelpatel0504
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application DevelopmentBenny Skogberg
 
Android ui dialog
Android ui dialogAndroid ui dialog
Android ui dialogKrazy Koder
 
Android chapter02-setup2-emulator
Android chapter02-setup2-emulatorAndroid chapter02-setup2-emulator
Android chapter02-setup2-emulatorguru472
 

Mais procurados (20)

Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Android Widget
Android WidgetAndroid Widget
Android Widget
 
android activity
android activityandroid activity
android activity
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The Basics
 
Android activity
Android activityAndroid activity
Android activity
 
04 activities and activity life cycle
04 activities and activity life cycle04 activities and activity life cycle
04 activities and activity life cycle
 
Android Services
Android ServicesAndroid Services
Android Services
 
Introduction to Android, Architecture & Components
Introduction to  Android, Architecture & ComponentsIntroduction to  Android, Architecture & Components
Introduction to Android, Architecture & Components
 
Android notification
Android notificationAndroid notification
Android notification
 
Android AIDL Concept
Android AIDL ConceptAndroid AIDL Concept
Android AIDL Concept
 
AndroidManifest
AndroidManifestAndroidManifest
AndroidManifest
 
Android ui layout
Android ui layoutAndroid ui layout
Android ui layout
 
Android Development Slides
Android Development SlidesAndroid Development Slides
Android Development Slides
 
Android animation
Android animationAndroid animation
Android animation
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android User Interface
Android User InterfaceAndroid User Interface
Android User Interface
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Android ui dialog
Android ui dialogAndroid ui dialog
Android ui dialog
 
Android chapter02-setup2-emulator
Android chapter02-setup2-emulatorAndroid chapter02-setup2-emulator
Android chapter02-setup2-emulator
 

Destaque

Creating apps that work on all screen sizes
Creating apps that work on all screen sizesCreating apps that work on all screen sizes
Creating apps that work on all screen sizesRavi Vyas
 
Design Multiple Screen android
Design Multiple Screen androidDesign Multiple Screen android
Design Multiple Screen androidChaiwoot Phrombutr
 
Screen orientations in android
Screen orientations in androidScreen orientations in android
Screen orientations in androidmanjakannar
 
Using the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidUsing the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidXavier Hallade
 
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2CommonsWare
 
Developing and Designing Multiscreen Android apps
Developing and Designing Multiscreen Android appsDeveloping and Designing Multiscreen Android apps
Developing and Designing Multiscreen Android appsManikantan Krishnamurthy
 
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManagerSecondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManagerCommonsWare
 
Supporting multi screen in android
Supporting multi screen in androidSupporting multi screen in android
Supporting multi screen in androidrffffffff007
 
Ts android supporting multiple screen
Ts   android supporting multiple screenTs   android supporting multiple screen
Ts android supporting multiple screenConfiz
 
Implementing cast in android
Implementing cast in androidImplementing cast in android
Implementing cast in androidAngelo Rüggeberg
 
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...BeMyApp
 
Android Development - Process & Tools
Android Development - Process & ToolsAndroid Development - Process & Tools
Android Development - Process & ToolsLope Emano
 
Android supporting multiple screen
Android supporting multiple screenAndroid supporting multiple screen
Android supporting multiple screenDao Quang Anh
 
"How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use...
"How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use..."How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use...
"How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use...FELGO SDK
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application DevelopmentRamesh Prasad
 
Practical QML - Key Navigation, Dynamic Language and Theme Change
Practical QML - Key Navigation, Dynamic Language and Theme ChangePractical QML - Key Navigation, Dynamic Language and Theme Change
Practical QML - Key Navigation, Dynamic Language and Theme ChangeBurkhard Stubert
 

Destaque (17)

Creating apps that work on all screen sizes
Creating apps that work on all screen sizesCreating apps that work on all screen sizes
Creating apps that work on all screen sizes
 
Design Multiple Screen android
Design Multiple Screen androidDesign Multiple Screen android
Design Multiple Screen android
 
Screen orientations in android
Screen orientations in androidScreen orientations in android
Screen orientations in android
 
Using the Presentation API and external screens on Android
Using the Presentation API and external screens on AndroidUsing the Presentation API and external screens on Android
Using the Presentation API and external screens on Android
 
Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2Second-Screen Support in Android 4.2
Second-Screen Support in Android 4.2
 
Developing and Designing Multiscreen Android apps
Developing and Designing Multiscreen Android appsDeveloping and Designing Multiscreen Android apps
Developing and Designing Multiscreen Android apps
 
Secondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManagerSecondary Screen Support Using DisplayManager
Secondary Screen Support Using DisplayManager
 
Supporting multi screen in android
Supporting multi screen in androidSupporting multi screen in android
Supporting multi screen in android
 
Ts android supporting multiple screen
Ts   android supporting multiple screenTs   android supporting multiple screen
Ts android supporting multiple screen
 
Touch screen
Touch screenTouch screen
Touch screen
 
Implementing cast in android
Implementing cast in androidImplementing cast in android
Implementing cast in android
 
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
 
Android Development - Process & Tools
Android Development - Process & ToolsAndroid Development - Process & Tools
Android Development - Process & Tools
 
Android supporting multiple screen
Android supporting multiple screenAndroid supporting multiple screen
Android supporting multiple screen
 
"How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use...
"How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use..."How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use...
"How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use...
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Practical QML - Key Navigation, Dynamic Language and Theme Change
Practical QML - Key Navigation, Dynamic Language and Theme ChangePractical QML - Key Navigation, Dynamic Language and Theme Change
Practical QML - Key Navigation, Dynamic Language and Theme Change
 

Semelhante a Supporting multiple screens on android

Android training day 3
Android training day 3Android training day 3
Android training day 3Vivek Bhusal
 
Supporting multi screen in android cn
Supporting multi screen in android cnSupporting multi screen in android cn
Supporting multi screen in android cnrffffffff007
 
Design guidelines for android developers
Design guidelines for android developersDesign guidelines for android developers
Design guidelines for android developersQandil Tariq
 
Supporting Multiple Screen In Android
Supporting Multiple Screen In AndroidSupporting Multiple Screen In Android
Supporting Multiple Screen In Androidrobbypontas
 
Designing Android apps for multiple screens
Designing Android apps for multiple screensDesigning Android apps for multiple screens
Designing Android apps for multiple screensAbhijeet Dutta
 
Android在多屏幕、多设备上的适配 | 布丁 任斐
Android在多屏幕、多设备上的适配 | 布丁 任斐Android在多屏幕、多设备上的适配 | 布丁 任斐
Android在多屏幕、多设备上的适配 | 布丁 任斐imShining @DevCamp
 
Designing for Android - Anjan Shrestha
Designing for Android - Anjan ShresthaDesigning for Android - Anjan Shrestha
Designing for Android - Anjan ShresthaMobileNepal
 
Coding for different resolutions
Coding for different resolutionsCoding for different resolutions
Coding for different resolutionsRobin Srivastava
 
Social storage drive s talesapp 2012
Social storage drive s talesapp 2012Social storage drive s talesapp 2012
Social storage drive s talesapp 2012Will Kim
 
Social storage drive s talesapp_20120711
Social storage drive s talesapp_20120711Social storage drive s talesapp_20120711
Social storage drive s talesapp_20120711Will Kim
 
How to deal with Fragmentation on Android
How to deal with Fragmentation on AndroidHow to deal with Fragmentation on Android
How to deal with Fragmentation on AndroidSittiphol Phanvilai
 
Android Design Integration
Android Design IntegrationAndroid Design Integration
Android Design IntegrationEvgeny Belyaev
 
Beating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageBeating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageXamarin
 
Xamarin Evolve 2014 - Designing Android UIs for the Ever Changing Device Land...
Xamarin Evolve 2014 - Designing Android UIs for the Ever Changing Device Land...Xamarin Evolve 2014 - Designing Android UIs for the Ever Changing Device Land...
Xamarin Evolve 2014 - Designing Android UIs for the Ever Changing Device Land...mstonis
 
Top 10 Features Landscape Design Software
Top 10 Features Landscape Design SoftwareTop 10 Features Landscape Design Software
Top 10 Features Landscape Design SoftwareLands-Design
 

Semelhante a Supporting multiple screens on android (20)

Android training day 3
Android training day 3Android training day 3
Android training day 3
 
Supporting multi screen in android cn
Supporting multi screen in android cnSupporting multi screen in android cn
Supporting multi screen in android cn
 
divide and qonquer
divide and qonquerdivide and qonquer
divide and qonquer
 
Design guidelines for android developers
Design guidelines for android developersDesign guidelines for android developers
Design guidelines for android developers
 
Supporting Multiple Screen In Android
Supporting Multiple Screen In AndroidSupporting Multiple Screen In Android
Supporting Multiple Screen In Android
 
Designing Android apps for multiple screens
Designing Android apps for multiple screensDesigning Android apps for multiple screens
Designing Android apps for multiple screens
 
Android在多屏幕、多设备上的适配 | 布丁 任斐
Android在多屏幕、多设备上的适配 | 布丁 任斐Android在多屏幕、多设备上的适配 | 布丁 任斐
Android在多屏幕、多设备上的适配 | 布丁 任斐
 
UI and UX for Mobile Developers
UI and UX for Mobile DevelopersUI and UX for Mobile Developers
UI and UX for Mobile Developers
 
Designing for Android - Anjan Shrestha
Designing for Android - Anjan ShresthaDesigning for Android - Anjan Shrestha
Designing for Android - Anjan Shrestha
 
Coding for different resolutions
Coding for different resolutionsCoding for different resolutions
Coding for different resolutions
 
Social storage drive s talesapp 2012
Social storage drive s talesapp 2012Social storage drive s talesapp 2012
Social storage drive s talesapp 2012
 
Social storage drive s talesapp_20120711
Social storage drive s talesapp_20120711Social storage drive s talesapp_20120711
Social storage drive s talesapp_20120711
 
How to deal with Fragmentation on Android
How to deal with Fragmentation on AndroidHow to deal with Fragmentation on Android
How to deal with Fragmentation on Android
 
Android Design Integration
Android Design IntegrationAndroid Design Integration
Android Design Integration
 
Beating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageBeating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett Duncavage
 
Xamarin Evolve 2014 - Designing Android UIs for the Ever Changing Device Land...
Xamarin Evolve 2014 - Designing Android UIs for the Ever Changing Device Land...Xamarin Evolve 2014 - Designing Android UIs for the Ever Changing Device Land...
Xamarin Evolve 2014 - Designing Android UIs for the Ever Changing Device Land...
 
Top 10 Features Landscape Design Software
Top 10 Features Landscape Design SoftwareTop 10 Features Landscape Design Software
Top 10 Features Landscape Design Software
 
Multi Screen Hell
Multi Screen HellMulti Screen Hell
Multi Screen Hell
 
(2) gui drawing
(2) gui drawing(2) gui drawing
(2) gui drawing
 
Graphics
GraphicsGraphics
Graphics
 

Mais de Li SUN

Trends in the software industry
Trends in the software industryTrends in the software industry
Trends in the software industryLi SUN
 
Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming ParadigmsLi SUN
 
One Billion Customers in China, estimation of passenger car demand for year 2030
One Billion Customers in China, estimation of passenger car demand for year 2030One Billion Customers in China, estimation of passenger car demand for year 2030
One Billion Customers in China, estimation of passenger car demand for year 2030Li SUN
 
Visual Software R&D Management
Visual Software R&D ManagementVisual Software R&D Management
Visual Software R&D ManagementLi SUN
 
Crystal taste - how brands shift perceived taste of bottled water
Crystal taste - how brands shift perceived taste of bottled waterCrystal taste - how brands shift perceived taste of bottled water
Crystal taste - how brands shift perceived taste of bottled waterLi SUN
 
Visual Project Management On One Page
Visual Project Management On One PageVisual Project Management On One Page
Visual Project Management On One PageLi SUN
 
Visual Business Model On One Page
Visual Business Model On One PageVisual Business Model On One Page
Visual Business Model On One PageLi SUN
 

Mais de Li SUN (7)

Trends in the software industry
Trends in the software industryTrends in the software industry
Trends in the software industry
 
Programming Paradigms
Programming ParadigmsProgramming Paradigms
Programming Paradigms
 
One Billion Customers in China, estimation of passenger car demand for year 2030
One Billion Customers in China, estimation of passenger car demand for year 2030One Billion Customers in China, estimation of passenger car demand for year 2030
One Billion Customers in China, estimation of passenger car demand for year 2030
 
Visual Software R&D Management
Visual Software R&D ManagementVisual Software R&D Management
Visual Software R&D Management
 
Crystal taste - how brands shift perceived taste of bottled water
Crystal taste - how brands shift perceived taste of bottled waterCrystal taste - how brands shift perceived taste of bottled water
Crystal taste - how brands shift perceived taste of bottled water
 
Visual Project Management On One Page
Visual Project Management On One PageVisual Project Management On One Page
Visual Project Management On One Page
 
Visual Business Model On One Page
Visual Business Model On One PageVisual Business Model On One Page
Visual Business Model On One Page
 

Último

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Último (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Supporting multiple screens on android

  • 1. SunLi@MrSunLi.com http://MrSunLi.com Supporting Multiple Screens On Android (covers 4.0)
  • 2. Target Audiences • Designer for graphics assets for Android devices • Designer for graphics assets for Android apps • Beginning developers for Android apps 2
  • 3. Agenda • Challenges • Solutions • Web resources • Key takeaway • Technical details – Technical terms and concepts – Range of screens supported – Alternative graphics assets for different screen densities – Web resources 3
  • 4. Resolution independence and density independence are critical challenges 4
  • 5. Resolution is well-managed by Android, but density might blur graphics assets • ldpi = 120 – 36 x 36 px • mdpi = 160 – 48 x 48 px • hdpi = 240 Screen snapshot on a hdpi device – 72 x 72 px • xhdpi = 320 – 96 x 96 px 5
  • 6. Density can be managed by Android with standard categories, although device display panels are diversified Wildfire 125 dpi Xoom 149 dpi Nexus S 235 dpi Galaxy Nexus 316 dpi 6
  • 7. Density-independent pixel (dp) is a new virtual unit for conceptual design dp 7
  • 8. Extra graphics assets with proper program structure can resolve density challenge Android Devices Device Dedicated Apps Public Apps Wallpaper, boot-up App launcher icon, menu icon, background animation, etc. images, etc. To design graphic assets against device To assume dp/mdpi in physical pixels as usual conceptual design To design four versions graphic assets (3:4:6:8 scaling ratio) for ldpi, mdpi, hdpi and xhdpi 8
  • 9. New Android Design site is official reference http://developer.android.com/design/index.html Also can download official Android icon templates pack here http://developer.android.com/guide/practices/ui_guidelines/icon_design.html#templatespack 9
  • 10. Android Asset Studio can saving your time http://j.mp/androidassetstudio 10
  • 11. Pencil with Android Stencils is a nice UI prototyping tool http://pencil.evolus.vn http://code.google.com/p/android-ui-utils/ 11
  • 12. Key takeaway - public Android apps request more graphics assets • To assume dp/mdpi in conceptual design • To design four versions graphic assets (3:4:6:8 scaling ratio) for ldpi, mdpi, hdpi and xhdpi Case study for Angry Bird 12
  • 14. Technical terms and concepts • Density-independent pixel (dp) – A virtual pixel unit that you should use when defining UI layout, to express layout dimensions or position in a density-independent way. – The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is the baseline density assumed by the system for a "medium" density screen. At runtime, the system transparently handles any scaling of the dp units, as necessary, based on the actual density of the screen in use. The conversion of dp units to screen pixels is simple: px = dp * (dpi / 160). For example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels. You should always use dp units when defining your application's UI, to ensure proper display of your UI on screens with different densities. 14
  • 15. Technical terms and concepts cont. • Screen size – Actual physical size, measured as the screen's diagonal. For simplicity, Android groups all actual screen sizes into four generalized sizes: small, normal, large, and extra large. • Screen density – The quantity of pixels within a physical area of the screen; usually referred to as dpi (dots per inch). For simplicity, Android groups all actual screen densities into four generalized densities: low, medium, high, and extra high. ~120dpi ~160dpi ~240dpi ~320dpi 15
  • 16. Technical terms and concepts cont. • Orientation – The orientation of the screen from the user's point of view. This is either landscape or portrait, meaning that the screen's aspect ratio is either wide or tall, respectively. Be aware that not only do different devices operate in different orientations by default, but the orientation can change at runtime when the user rotates the device. • Resolution – The total number of physical pixels on a screen. When adding support for multiple screens, applications do not work directly with resolution; applications should be concerned only with screen size and density, as specified by the generalized size and density groups. 16
  • 17. Range of screens supported • xlarge screens > 960 dp x 720 dp • large screens > 640 dp x 480 dp • normal screens > 470 dp x 320 dp • small screens > 426 dp x 320 dp • Note: The system bar in Android 3 and above reduces app space 17
  • 18. Range of screens supported cont. 18
  • 19. Range of screens supported cont. 19
  • 20. Alternative graphics assets for different screen densities • The configuration qualifiers you can use for density-specific resources are ldpi (low), mdpi (medium), hdpi (high), and xhdpi (extra high). For example, bitmaps for high-density screens should go in drawable-hdpi/. • By default, Android scales your bitmap drawables (.png, .jpg, and .gif files) and Nine-Patch drawables (.9.png files) so that they render at the appropriate physical size on each device. For example, if your application provides bitmap drawables only for the baseline, medium screen density (mdpi), then the system scales them up when on a high-density screen, and scales them down when on a low-density screen. This scaling can cause artifacts in the bitmaps. To ensure your bitmaps look their best, you should include alternative versions at different resolutions for different screen densities. 20
  • 21. Alternative graphics assets for different screen densities cont. • To create alternative bitmap drawables for different densities, you should follow the 3:4:6:8 scaling ratio between the four generalized densities. For example, if you have a bitmap drawable that's 48x48 pixels for medium- density screen (the size for a launcher icon), all the different sizes should be: – 36x36 for low-density – 48x48 for medium-density – 72x72 for high-density – 96x96 for extra high-density 21
  • 22. Nine-patch graphics assets • A NinePatchDrawable graphic is a stretchable bitmap image, which Android will automatically resize to accommodate the contents of the View in which you have placed it as the background. An example use of a NinePatch is the backgrounds used by standard Android buttons — buttons must stretch to accommodate strings of various lengths. A NinePatch drawable is a standard PNG image that includes an extra 1-pixel-wide border. It must be saved with the extension .9.png, and saved into the res/drawable/ directory of your project. 22
  • 23. Free Android tool: SDK/tools/draw9patch 23
  • 24. DPI online calculator http://www.pxcalc.com/ 24
  • 25. Technical details for supporting multiple screens • http://developer.android.com/guide/practices/screens_supp ort.html 25