SlideShare a Scribd company logo
In Android
Supporting Multiple ScreenSupporting Multiple Screen
In Android
Robby Pratama
robby.pratama@ansvia.com
@robbypontas
Why it's important?
Android runs on a variety of devices that offer
different screen sizes and densities. For
applications, the Android system provides a
consistent development environment across
devices and handles most of the work to adjust
each application's user interface to the screen
on which it is displayed.
How ?
1. Know about screen support
2. Explicitly declare in the manifest which screen sizes your
application supports
3. Using configuration qualifiers
4. Provide different bitmap drawables for different screen densities
5. Provide different layouts for different screen sizes
6. Use values
7. Scaling programmatically
8. Provide different APK
Screen Support
> Terms and Concepts
● Screen size
Actual physical size, measured as the screen's diagonal.
● Screen density
The quantity of pixels within a physical area of the screen; usually referred
to as dpi (dots per inch).
● Orientation
The orientation of the screen from the user's point of view.
● Resolution
The total number of physical pixels on a screen.
● 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.
Range of Screens Support
Range of Screens Support
A set of six generalized densities:
• ldpi (low) ~120dpi (0.75)
• mdpi (medium) ~160dpi (1.0)
• hdpi (high) ~240dpi (1.5)
• xhdpi (extra-high) ~320dpi (2.0)
• xxhdpi (extra-extra-high) ~480dpi (3.0)
• xxxhdpi (extra-extra-extra-high) ~640dpi (4.0)
How to Support Multiple Screens
1.Explicitly declare in the manifest which screen sizes your
application supports
Support All Screen
<supports-screens android:anyDensity="true"/>
Support Specific Screen
<supports-screens android:smallScreens="true"/>
<supports-screens android:normalScreens="true"/>
<supports-screens android:largeScreens="true"/>
<supports-screens android:xlargeScreens="true"/>
Using configuration qualifiers
Provide different bitmap drawables for different
screen densities
Provide different layouts for different screen sizes
Use Values
Scaling Programmatically
int width = 20; //in mdpi
//hdpi or other
float density = getResources().getDisplayMetrics()
.density;
Int dynamicWidth = 20 / density; //
Provide Multiple APK
Build an APK for each screen or each rules.
● You can define more specific rules for each APK
● It is hard to maintenance when there are some
redesign or even new features.
What is the best way ?
The best way is follow the rules. Because it is possible in one application to use all of
these way. One way cannot cover all of need each asset or layout in all screen size.
In the special case, the best way is depend on the application itself (by UI Design, UX, and
possibilities of user variety.
● Question?
Source
● http://developer.android.com/

More Related Content

Viewers also liked

FirstPath-Autism-Intrduction
FirstPath-Autism-IntrductionFirstPath-Autism-Intrduction
FirstPath-Autism-Intrduction
Janine Robertson
 
Policy innovation platform [draft!]
Policy innovation platform [draft!]Policy innovation platform [draft!]
Policy innovation platform [draft!]
Civic Tech Toronto
 
Kate Collins and Judy Duncan's slides from Civic Tech Toronto hacknight, Jul ...
Kate Collins and Judy Duncan's slides from Civic Tech Toronto hacknight, Jul ...Kate Collins and Judy Duncan's slides from Civic Tech Toronto hacknight, Jul ...
Kate Collins and Judy Duncan's slides from Civic Tech Toronto hacknight, Jul ...
Civic Tech Toronto
 
Choosing a behavioral health accreditator
Choosing a behavioral health accreditatorChoosing a behavioral health accreditator
Choosing a behavioral health accreditator
Melinda Lehman
 
Delana Denman Resume
Delana Denman ResumeDelana Denman Resume
Delana Denman Resume
Delana Denman
 
Presentation to Civic Tech Toronto by Cindy Tan
Presentation to Civic Tech Toronto by Cindy TanPresentation to Civic Tech Toronto by Cindy Tan
Presentation to Civic Tech Toronto by Cindy Tan
Civic Tech Toronto
 
The matrix
The matrixThe matrix
The question remains: To OER or Not to OER
The question remains: To OER or Not to OERThe question remains: To OER or Not to OER
The question remains: To OER or Not to OER
LisaBellDavis
 
How to Choose a Behavioral Health Accreditator
How to Choose a Behavioral Health AccreditatorHow to Choose a Behavioral Health Accreditator
How to Choose a Behavioral Health Accreditator
Melinda Lehman
 
About joint commission behavioral accreditation
About joint commission behavioral accreditationAbout joint commission behavioral accreditation
About joint commission behavioral accreditation
Melinda Lehman
 
Neurocutaneous syndromes
Neurocutaneous syndromesNeurocutaneous syndromes
Neurocutaneous syndromes
Jagadeesh Chittuluri
 

Viewers also liked (11)

FirstPath-Autism-Intrduction
FirstPath-Autism-IntrductionFirstPath-Autism-Intrduction
FirstPath-Autism-Intrduction
 
Policy innovation platform [draft!]
Policy innovation platform [draft!]Policy innovation platform [draft!]
Policy innovation platform [draft!]
 
Kate Collins and Judy Duncan's slides from Civic Tech Toronto hacknight, Jul ...
Kate Collins and Judy Duncan's slides from Civic Tech Toronto hacknight, Jul ...Kate Collins and Judy Duncan's slides from Civic Tech Toronto hacknight, Jul ...
Kate Collins and Judy Duncan's slides from Civic Tech Toronto hacknight, Jul ...
 
Choosing a behavioral health accreditator
Choosing a behavioral health accreditatorChoosing a behavioral health accreditator
Choosing a behavioral health accreditator
 
Delana Denman Resume
Delana Denman ResumeDelana Denman Resume
Delana Denman Resume
 
Presentation to Civic Tech Toronto by Cindy Tan
Presentation to Civic Tech Toronto by Cindy TanPresentation to Civic Tech Toronto by Cindy Tan
Presentation to Civic Tech Toronto by Cindy Tan
 
The matrix
The matrixThe matrix
The matrix
 
The question remains: To OER or Not to OER
The question remains: To OER or Not to OERThe question remains: To OER or Not to OER
The question remains: To OER or Not to OER
 
How to Choose a Behavioral Health Accreditator
How to Choose a Behavioral Health AccreditatorHow to Choose a Behavioral Health Accreditator
How to Choose a Behavioral Health Accreditator
 
About joint commission behavioral accreditation
About joint commission behavioral accreditationAbout joint commission behavioral accreditation
About joint commission behavioral accreditation
 
Neurocutaneous syndromes
Neurocutaneous syndromesNeurocutaneous syndromes
Neurocutaneous syndromes
 

Similar to Supporting Multiple Screen In Android

divide and qonquer
divide and qonquerdivide and qonquer
divide and qonquer
Arvind Choudhary
 
Android training day 3
Android training day 3Android training day 3
Android training day 3
Vivek Bhusal
 
Designing Android apps for multiple screens
Designing Android apps for multiple screensDesigning Android apps for multiple screens
Designing Android apps for multiple screens
Abhijeet Dutta
 
Android在多屏幕、多设备上的适配 | 布丁 任斐
Android在多屏幕、多设备上的适配 | 布丁 任斐Android在多屏幕、多设备上的适配 | 布丁 任斐
Android在多屏幕、多设备上的适配 | 布丁 任斐
imShining @DevCamp
 
Supporting multi screen in android cn
Supporting multi screen in android cnSupporting multi screen in android cn
Supporting multi screen in android cn
rffffffff007
 
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
 
Android Development - Session 4
Android Development - Session 4Android Development - Session 4
Android Development - Session 4
Mohammad Shaker
 
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
Sittiphol Phanvilai
 
Android Programming Basic
Android Programming BasicAndroid Programming Basic
Android Programming Basic
Duy Do Phan
 
Multi Screen Hell
Multi Screen HellMulti Screen Hell
Multi Screen Hell
Abdullah Çetin ÇAVDAR
 
Beating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageBeating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett Duncavage
Xamarin
 
UI and UX for Mobile Developers
UI and UX for Mobile DevelopersUI and UX for Mobile Developers
UI and UX for Mobile Developers
Mohamed Nabil, MSc.
 
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
Xavier Hallade
 
Design guidelines for android developers
Design guidelines for android developersDesign guidelines for android developers
Design guidelines for android developers
Qandil Tariq
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
Ramesh Prasad
 
Android webinar class_1
Android webinar class_1Android webinar class_1
Android webinar class_1
Edureka!
 
Introduction to mobile programming with Androids.
Introduction to mobile programming with Androids. Introduction to mobile programming with Androids.
Introduction to mobile programming with Androids.
Maksim Golivkin
 
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phonesLumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lucian Tomuța
 
Tech Talk July 29 - Pixel
Tech Talk July 29 - Pixel Tech Talk July 29 - Pixel
Tech Talk July 29 - Pixel
Indosystem
 
Android for Beginners
Android  for BeginnersAndroid  for Beginners
Android for Beginners
Ganesh Kanna S
 

Similar to Supporting Multiple Screen In Android (20)

divide and qonquer
divide and qonquerdivide and qonquer
divide and qonquer
 
Android training day 3
Android training day 3Android training day 3
Android training day 3
 
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在多屏幕、多设备上的适配 | 布丁 任斐
 
Supporting multi screen in android cn
Supporting multi screen in android cnSupporting multi screen in android cn
Supporting multi screen in android cn
 
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...
 
Android Development - Session 4
Android Development - Session 4Android Development - Session 4
Android Development - Session 4
 
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 Programming Basic
Android Programming BasicAndroid Programming Basic
Android Programming Basic
 
Multi Screen Hell
Multi Screen HellMulti Screen Hell
Multi Screen Hell
 
Beating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageBeating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett Duncavage
 
UI and UX for Mobile Developers
UI and UX for Mobile DevelopersUI and UX for Mobile Developers
UI and UX for Mobile Developers
 
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
 
Design guidelines for android developers
Design guidelines for android developersDesign guidelines for android developers
Design guidelines for android developers
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Android webinar class_1
Android webinar class_1Android webinar class_1
Android webinar class_1
 
Introduction to mobile programming with Androids.
Introduction to mobile programming with Androids. Introduction to mobile programming with Androids.
Introduction to mobile programming with Androids.
 
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phonesLumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
 
Tech Talk July 29 - Pixel
Tech Talk July 29 - Pixel Tech Talk July 29 - Pixel
Tech Talk July 29 - Pixel
 
Android for Beginners
Android  for BeginnersAndroid  for Beginners
Android for Beginners
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 

Supporting Multiple Screen In Android

  • 1. In Android Supporting Multiple ScreenSupporting Multiple Screen In Android Robby Pratama robby.pratama@ansvia.com @robbypontas
  • 2. Why it's important? Android runs on a variety of devices that offer different screen sizes and densities. For applications, the Android system provides a consistent development environment across devices and handles most of the work to adjust each application's user interface to the screen on which it is displayed.
  • 3. How ? 1. Know about screen support 2. Explicitly declare in the manifest which screen sizes your application supports 3. Using configuration qualifiers 4. Provide different bitmap drawables for different screen densities 5. Provide different layouts for different screen sizes 6. Use values 7. Scaling programmatically 8. Provide different APK
  • 4. Screen Support > Terms and Concepts ● Screen size Actual physical size, measured as the screen's diagonal. ● Screen density The quantity of pixels within a physical area of the screen; usually referred to as dpi (dots per inch). ● Orientation The orientation of the screen from the user's point of view. ● Resolution The total number of physical pixels on a screen. ● 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.
  • 6. Range of Screens Support A set of six generalized densities: • ldpi (low) ~120dpi (0.75) • mdpi (medium) ~160dpi (1.0) • hdpi (high) ~240dpi (1.5) • xhdpi (extra-high) ~320dpi (2.0) • xxhdpi (extra-extra-high) ~480dpi (3.0) • xxxhdpi (extra-extra-extra-high) ~640dpi (4.0)
  • 7. How to Support Multiple Screens 1.Explicitly declare in the manifest which screen sizes your application supports Support All Screen <supports-screens android:anyDensity="true"/> Support Specific Screen <supports-screens android:smallScreens="true"/> <supports-screens android:normalScreens="true"/> <supports-screens android:largeScreens="true"/> <supports-screens android:xlargeScreens="true"/>
  • 9. Provide different bitmap drawables for different screen densities
  • 10. Provide different layouts for different screen sizes
  • 12. Scaling Programmatically int width = 20; //in mdpi //hdpi or other float density = getResources().getDisplayMetrics() .density; Int dynamicWidth = 20 / density; //
  • 13. Provide Multiple APK Build an APK for each screen or each rules. ● You can define more specific rules for each APK ● It is hard to maintenance when there are some redesign or even new features.
  • 14. What is the best way ? The best way is follow the rules. Because it is possible in one application to use all of these way. One way cannot cover all of need each asset or layout in all screen size. In the special case, the best way is depend on the application itself (by UI Design, UX, and possibilities of user variety.