SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Fast-track to Android design:
the missing parts
  -   What screens are there?
  -   How to cope with this variety?
  -   Tactics for pixel perfection
  -   Technical design




@MaksimGolivkin
@AndrodAalto Community
Motivation
  “Official” handsets: 165+
  “Official” tablets: 45+

  OpenSignalMaps report 3997 devices



Why does it matters?
  56% smartphones world wide run Android
  42% smartphones run Android in US
Concepts of the platform
Generalized sizes
  Generalized size   Diagonal      Interpretation
  Small              2” − 3.4”              legacy phones
  Normal             3” − 4.7”                 phones

  Large              4.2” − 7.3”          “tweener” tablets

  Extra Large        7” − ∞                    tablets
Popular* screens
             Phone             Generalized size
             s     small normal large extra large
             240x320    2.3%
             240x400
             240x423
                                0.7%
             320x480            26.2%
             480x640    2%
              480x800
              480x854           57.8%     2.3%   “Tweener”
             600x1024                            tablets
Resolution




             720x1280
             800x1280
                                0.9%
             1024x768
             1280x768                                 7%        Tablets
             1280x800


             *Not all the px resolutions are present! See phones and tablets database
             Data was collected in 7-days ending on May 1, 2012
Phone* screens
                        Generalized size
    Mostly Legacy         small      normal
              240x320      2.3%
              240x400
              240x423
                                      0.7%
              320x480                 26.2%
              480x640       2%                           The trend
Resolution




              480x800
              480x854                 57.8%
             600x1024
             720x1280
             800x1280
                                      0.9%


               4.3% in small phones
               85.6% in normal phones

             *Not all the pixel resolutions are present! See phones database
             Data was collected in 7-days ending on May 1, 2012
Tablet* screens
                          Generalized size
   “Tweeners” large                extra large
  Resolution

                480x800
                480x854     2.3%
               600x1024
               1024x768
                                                       The trend
               1280x768               7%
               1280x800




        *Not all the pixel resolutions are present! See tablets database.
        Data was collected in 7-days ending on May 1, 2012
Screen density
 Screen density is physical characteristic of the
 screen technology, which determines screen
 size and resolution

 Screen density can be estimated using following
 formula:

                       pixel _ width 2 + pixel _ height 2
  screen _ density =
                           diagonal _ in _ inches


 Density is expressed in db – “density
 independent pixels”.
Physical size of dp
“pixel” is the same




                                                42 dp height



    Samsung Galaxy Ace      Asus Nexus 7
       320x480 px            1280x720 px
    mdpi density bucket   hdpi density bucket
Density buckets
  Devices are grouped into density buckets
  according to the physical screen density.

  Density bucket is hard-coded, but can be
  estimated based on the following heuristics.

  Density bucket           Screen density range
  ldpi (low)                    100 ~ 140 dp

  mdpi (medium)                 140 ~ 200 dp

  hdpi (high)                   200 ~ 280 dp

  xhdpi (extra high)            280 ~ 340 dp



  See phones and tablets database to find out
  about the density of relevant device.
Devices in one density bucket




      3.7”
                         4.2”
   Nexus One
                   Samsung Galaxy S2
   320x533 dp
                      320x533 dp
Devices in one density bucket




      3”               3.5”                    10.1”
Sony Xperia X8   Samsung Galaxy Ace   Asus Transformer Prime
 320x480 dp         320x480 dp             1280x800 dp
Awkward moment
                                                       Generalized size
                               small      normal           large     extra large
               240x320 px    320x426 dp
               240x400 px                 320x533 dp
               240x432 px                 320x576 dp
               320x480 px                 320x480 dp
               480x640 px    240x320 dp
                                                       640x1067 dp
               480x800 px                 320x533 dp    480x800 dp
                                                       640x1138 dp
                480x854 px                320x568 dp    480x854 dp
               600x1024 px                413x683 dp   600x1024 dp
Resolutions




                640x960 px                320x480 dp
               720x1280 px                360x640 dp
               800x1280 px                400x640 dp
               1024x768 px                                           1024x768 dp
               1280x768 px                                           1280x768 dp
               1280x800 px                                           1280x800 dp
              *Not all the pixel resolutions are present
Dp resolutions




                      800x1280 px




       5.3”                                  10.1”
Samsung Galaxy Note                 Asus Transformer Prime
    400x640 dp                           800x1280 dp
Only 12 dp resolutions (so far)
   Generalized Density   Resolution*
      size     bucket       (dp)
  small          ldpi       320x426    legacy phones
  small          hdpi       240x320    legacy phones
  normal         ldpi       320x533    legacy phones
                            320x576
  normal         mdpi       320x480    phones
  normal         hdpi       320x533    phones
                            320x568
  normal        xhdpi       320x480    new phones
                            360x640
                            400x640
  large          ldpi      640x1067    tweener tablets
                           640x1138
  large          mdpi       480x800    tweener tablets
                            480x854
                           600x1024
  extra large    mdpi      1024x768    tablets
                           1280x768
                           1280x800
Handling many screens
One application
- multiple layouts
  It is obvious that due to larger screens and different
  resolutions, tablets require their own UI, which takes
  advantage of larger screen “real estate”.

  Of course, looking at the market share of small phones
  and “tweener” tablets (4.3% and 4%) they are less
  significant.

  However, the longer side of most devices is 30%-60%
  bigger than the shorter side. Thus, landscape orientation
  may need a separate layout.

  Wider layouts can be reused for landscape orientation of
  smaller devices.
Orientation is just another
screen resolution.
  400x640 dp in portrait       320x420 dp in portrait




                               320x420 in landscape




      320x400 dp in portrait
Two useful patterns
  “stretching” layout        “centering” layout




                                       Margins


   320x480 dp stretches to   320x480 is centered in 400x640
   400x640 dp



  Plan for resizable elements and/or margins.
Choose “switching points”


  240dp               320dp    360dp   400dp 426dp   480dp    533dp   568dp 578dp     640dp



small size portrait           small size landscape            normal size landscape
                              normal size portrait            large size portrait

          By listing all the possible layout widths (both orientations),
          we see how do they cluster.

          Choose switching points, when do you
          a) introduce new layout
          b) start/stop growing margins
          c) start/stop growing element size
One layout and many
          many adjustments
               Home base
  240dp               320dp    360dp   400dp 426dp   480dp   533dp   568dp 578dp     640dp



small size portrait           small size landscape           normal size landscape
                              normal size portrait           large size portrait



          resized elements
          margins added
          new layout
How many layout
enough?
  Every additional layout adds significant effort,
  but improves user experience.

  Options worth considering:
  - portrait only on the handset
  - landscape only on the tablet

  Use market research to understand, what your target
  customers are using.
2 layouts - richer UI

               Home base
  240dp               320dp    360dp   400dp 426dp   480dp   533dp   568dp 578dp     640dp



small size portrait           small size landscape           normal size landscape
                              normal size portrait           large size portrait



          resized elements & margins
          new layout

       Make advantage from more screen “real estate”!
Tablet layouts on
3.2 and after
  Starting Android 3.2 it is possible to target screens using
  width, height and “smallest width” (shortest screen
  dimension, ignoring orientation).

  Very useful!

    Smallest      Generalized Density      Orientation
     width           size     bucket
      768 dp     extra large      mdpi          portrait
      768 dp     extra large      mdpi          portrait
      800 dp     extra large      mdpi          portrait
     1024 dp     extra large      mdpi        landscape
     1280 dp     extra large      mdpi        landscape
     1280 dp     extra large      mdpi        landscape
Before 3.2: a bit more tricky!
  For Android prior 3.2 you could only target screen
  groups using generalized size, density bucket and screen
  orientation combination.

  Still possible to target “smallest width”.

  Short side Short side Generalized Density Orientation
     min       max         size     bucket
    240 dp        (same)   small               hdpi     portrait
    320 dp        (same)   small               ldpi     portrait
    320 dp        (same)   normal              hdpi     portrait
    320 dp        (same)   normal              ldpi     portrait
    320 dp        (same)   normal              mdpi     portrait
    320 dp        (same)   small               hdpi   landscape
    426 dp        (same)   small               ldpi   landscape
    480 dp        600 dp   large               mdpi     portrait
    480 dp        (same)   normal              mdpi   landscape
    533 dp        568 dp   normal              hdpi   landscape
    533 dp        (same)   normal              ldpi   landscape
    640 dp        576 dp   large               ldpi     portrait
Designing layout:
the process
  Process for designing a layout in dp:
  1. Research market and decide on the screen groups
  2. Find smallest dp resolution for every screen group
  3. Design for the smallest db resolution on a canvas equal
     to biggest pixel resolution
  4. Enhance it for bigger resolutions from the group
  5. Make sure that sizes of reused elements translate into
     all pixel densities groups without a reminder.

  Pixel perfect rule:
       If you support ldpi, dp sizes have to be dividable by 4.
       If you don’t, sizes have to be dividable by 2.
Random advices
Phone dp width is increasing
               Until recently, all Android phones had 320dp width
               and 5”-7” tablets sometimes had 480dp.


                      majority        a few    Galaxy Note              5”-7” tablets
Phones (short edge)
                       320 dp        360 dp       400 dp                   480 dp



              At the moment, number of phones with screen
              width = 360 dp is growing fast. However, these phones
              are running Android 4.0, so they can be addressed using
              “tablet” layouts
Simple scaling or SVG
isn’t the best solution!
  Smaller icons need to be redrawn to look better!

  Below there are icons for pictures folder in Mac OS X.




  Here is an article going into detail: About those vector icons
Rhythm
 Android is using 48dp rhythm –
 size which translates to physical area comfortable to touch.

 Spaces between elements are recommended to be at least 8dp.
Standard sizes
                                                    Density bucket
                       ldpi       mdpi       hdpi       xhdpi
        Launcher       36x36 px   48x48 px   72x72 px    96x96 px
                       24x24 px   32x32 px   48x48 px    64x64 px
        Action bar
                        (18x18)    (24x24)    (36x36)     48x48
                       12x12 px   16x16 px   24x24 px    32x32 px
        Contextual
                       (9x9) px    (12x12)    (18x18)     24x24
Icons




                       18x18 px   24x24 px   36x36 px    48x48 px
        Notification
                        (16x16)    (22x22)    (33x33)     (44x44)

        Except for the icons, platform doesn’t have many standard
        elements.

        For instance, action bar is 48-60dp depending on resolution
        and screen orientation.
File names
  Graphics artifact filenames:
  - CAN’T have spaces or dashes
  - MUST be in small letters
  - MUST start with a letter

  Your coder will love you for this!
Maybe …
 If the screen has only few field, consider making it into
 dialog.

 Transparent list and image backgrounds on lists can hinder
 performance/result in memory problems.

 Instead of launching progress dialog, consider animating
 interface elements, such as action bar items.

 Design with different font size for devices of different size.
FIN & Good luck!
  Contributors:
  - Maksim Golivkin, Android developer
  - Joonas Kukkonen, Elisa
  - Janne Toivola, Futurice
  - Antonio Guadagno, Exaget
  - Victoria Fedirko, Freelance designer

  Inspiration:
  - “iOS App Designer Guide to Developer Love”, Lemon
     Labs


   Looking for an Android developer?          www.golivkin.eu
   A freelancer?                           maksim@golivkin.eu

Weitere ähnliche Inhalte

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

Empfohlen

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Fast track to Android design

  • 1. Fast-track to Android design: the missing parts - What screens are there? - How to cope with this variety? - Tactics for pixel perfection - Technical design @MaksimGolivkin @AndrodAalto Community
  • 2. Motivation “Official” handsets: 165+ “Official” tablets: 45+ OpenSignalMaps report 3997 devices Why does it matters? 56% smartphones world wide run Android 42% smartphones run Android in US
  • 3. Concepts of the platform
  • 4. Generalized sizes Generalized size Diagonal Interpretation Small 2” − 3.4” legacy phones Normal 3” − 4.7” phones Large 4.2” − 7.3” “tweener” tablets Extra Large 7” − ∞ tablets
  • 5. Popular* screens Phone Generalized size s small normal large extra large 240x320 2.3% 240x400 240x423 0.7% 320x480 26.2% 480x640 2% 480x800 480x854 57.8% 2.3% “Tweener” 600x1024 tablets Resolution 720x1280 800x1280 0.9% 1024x768 1280x768 7% Tablets 1280x800 *Not all the px resolutions are present! See phones and tablets database Data was collected in 7-days ending on May 1, 2012
  • 6. Phone* screens Generalized size Mostly Legacy small normal 240x320 2.3% 240x400 240x423 0.7% 320x480 26.2% 480x640 2% The trend Resolution 480x800 480x854 57.8% 600x1024 720x1280 800x1280 0.9% 4.3% in small phones 85.6% in normal phones *Not all the pixel resolutions are present! See phones database Data was collected in 7-days ending on May 1, 2012
  • 7. Tablet* screens Generalized size “Tweeners” large extra large Resolution 480x800 480x854 2.3% 600x1024 1024x768 The trend 1280x768 7% 1280x800 *Not all the pixel resolutions are present! See tablets database. Data was collected in 7-days ending on May 1, 2012
  • 8. Screen density Screen density is physical characteristic of the screen technology, which determines screen size and resolution Screen density can be estimated using following formula: pixel _ width 2 + pixel _ height 2 screen _ density = diagonal _ in _ inches Density is expressed in db – “density independent pixels”.
  • 9. Physical size of dp “pixel” is the same 42 dp height Samsung Galaxy Ace Asus Nexus 7 320x480 px 1280x720 px mdpi density bucket hdpi density bucket
  • 10. Density buckets Devices are grouped into density buckets according to the physical screen density. Density bucket is hard-coded, but can be estimated based on the following heuristics. Density bucket Screen density range ldpi (low) 100 ~ 140 dp mdpi (medium) 140 ~ 200 dp hdpi (high) 200 ~ 280 dp xhdpi (extra high) 280 ~ 340 dp See phones and tablets database to find out about the density of relevant device.
  • 11. Devices in one density bucket 3.7” 4.2” Nexus One Samsung Galaxy S2 320x533 dp 320x533 dp
  • 12. Devices in one density bucket 3” 3.5” 10.1” Sony Xperia X8 Samsung Galaxy Ace Asus Transformer Prime 320x480 dp 320x480 dp 1280x800 dp
  • 13. Awkward moment Generalized size small normal large extra large 240x320 px 320x426 dp 240x400 px 320x533 dp 240x432 px 320x576 dp 320x480 px 320x480 dp 480x640 px 240x320 dp 640x1067 dp 480x800 px 320x533 dp 480x800 dp 640x1138 dp 480x854 px 320x568 dp 480x854 dp 600x1024 px 413x683 dp 600x1024 dp Resolutions 640x960 px 320x480 dp 720x1280 px 360x640 dp 800x1280 px 400x640 dp 1024x768 px 1024x768 dp 1280x768 px 1280x768 dp 1280x800 px 1280x800 dp *Not all the pixel resolutions are present
  • 14. Dp resolutions 800x1280 px 5.3” 10.1” Samsung Galaxy Note Asus Transformer Prime 400x640 dp 800x1280 dp
  • 15. Only 12 dp resolutions (so far) Generalized Density Resolution* size bucket (dp) small ldpi 320x426 legacy phones small hdpi 240x320 legacy phones normal ldpi 320x533 legacy phones 320x576 normal mdpi 320x480 phones normal hdpi 320x533 phones 320x568 normal xhdpi 320x480 new phones 360x640 400x640 large ldpi 640x1067 tweener tablets 640x1138 large mdpi 480x800 tweener tablets 480x854 600x1024 extra large mdpi 1024x768 tablets 1280x768 1280x800
  • 17. One application - multiple layouts It is obvious that due to larger screens and different resolutions, tablets require their own UI, which takes advantage of larger screen “real estate”. Of course, looking at the market share of small phones and “tweener” tablets (4.3% and 4%) they are less significant. However, the longer side of most devices is 30%-60% bigger than the shorter side. Thus, landscape orientation may need a separate layout. Wider layouts can be reused for landscape orientation of smaller devices.
  • 18. Orientation is just another screen resolution. 400x640 dp in portrait 320x420 dp in portrait 320x420 in landscape 320x400 dp in portrait
  • 19. Two useful patterns “stretching” layout “centering” layout Margins 320x480 dp stretches to 320x480 is centered in 400x640 400x640 dp Plan for resizable elements and/or margins.
  • 20. Choose “switching points” 240dp 320dp 360dp 400dp 426dp 480dp 533dp 568dp 578dp 640dp small size portrait small size landscape normal size landscape normal size portrait large size portrait By listing all the possible layout widths (both orientations), we see how do they cluster. Choose switching points, when do you a) introduce new layout b) start/stop growing margins c) start/stop growing element size
  • 21. One layout and many many adjustments Home base 240dp 320dp 360dp 400dp 426dp 480dp 533dp 568dp 578dp 640dp small size portrait small size landscape normal size landscape normal size portrait large size portrait resized elements margins added new layout
  • 22. How many layout enough? Every additional layout adds significant effort, but improves user experience. Options worth considering: - portrait only on the handset - landscape only on the tablet Use market research to understand, what your target customers are using.
  • 23. 2 layouts - richer UI Home base 240dp 320dp 360dp 400dp 426dp 480dp 533dp 568dp 578dp 640dp small size portrait small size landscape normal size landscape normal size portrait large size portrait resized elements & margins new layout Make advantage from more screen “real estate”!
  • 24. Tablet layouts on 3.2 and after Starting Android 3.2 it is possible to target screens using width, height and “smallest width” (shortest screen dimension, ignoring orientation). Very useful! Smallest Generalized Density Orientation width size bucket 768 dp extra large mdpi portrait 768 dp extra large mdpi portrait 800 dp extra large mdpi portrait 1024 dp extra large mdpi landscape 1280 dp extra large mdpi landscape 1280 dp extra large mdpi landscape
  • 25. Before 3.2: a bit more tricky! For Android prior 3.2 you could only target screen groups using generalized size, density bucket and screen orientation combination. Still possible to target “smallest width”. Short side Short side Generalized Density Orientation min max size bucket 240 dp (same) small hdpi portrait 320 dp (same) small ldpi portrait 320 dp (same) normal hdpi portrait 320 dp (same) normal ldpi portrait 320 dp (same) normal mdpi portrait 320 dp (same) small hdpi landscape 426 dp (same) small ldpi landscape 480 dp 600 dp large mdpi portrait 480 dp (same) normal mdpi landscape 533 dp 568 dp normal hdpi landscape 533 dp (same) normal ldpi landscape 640 dp 576 dp large ldpi portrait
  • 26. Designing layout: the process Process for designing a layout in dp: 1. Research market and decide on the screen groups 2. Find smallest dp resolution for every screen group 3. Design for the smallest db resolution on a canvas equal to biggest pixel resolution 4. Enhance it for bigger resolutions from the group 5. Make sure that sizes of reused elements translate into all pixel densities groups without a reminder. Pixel perfect rule: If you support ldpi, dp sizes have to be dividable by 4. If you don’t, sizes have to be dividable by 2.
  • 28. Phone dp width is increasing Until recently, all Android phones had 320dp width and 5”-7” tablets sometimes had 480dp. majority a few Galaxy Note 5”-7” tablets Phones (short edge) 320 dp 360 dp 400 dp 480 dp At the moment, number of phones with screen width = 360 dp is growing fast. However, these phones are running Android 4.0, so they can be addressed using “tablet” layouts
  • 29. Simple scaling or SVG isn’t the best solution! Smaller icons need to be redrawn to look better! Below there are icons for pictures folder in Mac OS X. Here is an article going into detail: About those vector icons
  • 30. Rhythm Android is using 48dp rhythm – size which translates to physical area comfortable to touch. Spaces between elements are recommended to be at least 8dp.
  • 31. Standard sizes Density bucket ldpi mdpi hdpi xhdpi Launcher 36x36 px 48x48 px 72x72 px 96x96 px 24x24 px 32x32 px 48x48 px 64x64 px Action bar (18x18) (24x24) (36x36) 48x48 12x12 px 16x16 px 24x24 px 32x32 px Contextual (9x9) px (12x12) (18x18) 24x24 Icons 18x18 px 24x24 px 36x36 px 48x48 px Notification (16x16) (22x22) (33x33) (44x44) Except for the icons, platform doesn’t have many standard elements. For instance, action bar is 48-60dp depending on resolution and screen orientation.
  • 32. File names Graphics artifact filenames: - CAN’T have spaces or dashes - MUST be in small letters - MUST start with a letter Your coder will love you for this!
  • 33. Maybe … If the screen has only few field, consider making it into dialog. Transparent list and image backgrounds on lists can hinder performance/result in memory problems. Instead of launching progress dialog, consider animating interface elements, such as action bar items. Design with different font size for devices of different size.
  • 34. FIN & Good luck! Contributors: - Maksim Golivkin, Android developer - Joonas Kukkonen, Elisa - Janne Toivola, Futurice - Antonio Guadagno, Exaget - Victoria Fedirko, Freelance designer Inspiration: - “iOS App Designer Guide to Developer Love”, Lemon Labs Looking for an Android developer? www.golivkin.eu A freelancer? maksim@golivkin.eu

Hinweis der Redaktion

  1. Incomplete, because a) not enough space b) not enough statistics to understand what devices run 3.0-3.1