SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Ravi Vyas
• Android Developer, Project Manager at Techjini Solution
  Pvt Ltd
• Co-Organizer of the Bangalore Android User Group
• Creator of the Blrdroid logos
•   Screen size
•   Screen density
•   Orientation
•   Resolution
• Phones are not always

• Android phones flavors :
     • Different screne sizes
     • Different screen densities


• Always have a design plan for both portrait and
  landscape :
• Landscape != Portrait + Δwidth - Δheight
• Use the <supports-screens> tag in the manifest to
  specify which screens you plan to support
• <supports-screens
           android:smallScreens="true"
           android:normalScreens="true"
           android:largeScreens="true"
           android:xlargeScreens="true“ />
• You can provide different resources & layouts based on
  various factors like screen size , screen pixel density ,
  orientation etc

       layout-land
       layout-port

       res-hdpi
       res-mdpi

   Android will handle changes by itself

• Manually handle configuration changes
    onConfigurationChanged(Configuration newConfig)
    android:configChanges="keyboard|orientation"
•   Do not use PX to specify size
•   Use rules for placement for pixel distances
•   Rethink, recheck your rules .
•   Check how alignParentLeft/Right will look on other
    screens
• 9 Patches
• XML Drawables

   <item android:id="@android:id/background">
      <shape>
        <corners android:radius="15dip" />
        <gradient
            android:startColor="#ff9d9e9d"
            android:centerColor="#ff5a5d5a"
            android:centerY="0.75"
            android:endColor="#ff747674"
            android:angle="270"
        />
      </shape>
   </item>
• While designing the UI enter real sample data to better
  visualize the UI.
• When displaying numbers , use the largest possible
  number to test
• Don’t trust emulator.
• Test on as many devices as possible.
• Motodev Studio – Device Anywhere
• contact@ravivyas.co
  m
• @ravivyas84
• Ravivyas.com/+

Weitere ähnliche Inhalte

Was ist angesagt?

Designing Android apps for multiple screens
Designing Android apps for multiple screensDesigning Android apps for multiple screens
Designing Android apps for multiple screensAbhijeet Dutta
 
UX and UI Designing for all android screen
UX and UI Designing for all android screenUX and UI Designing for all android screen
UX and UI Designing for all android screenArnold Saputra
 
Adaptive Design for Android
Adaptive Design for AndroidAdaptive Design for Android
Adaptive Design for AndroidNi Yan
 
Lec5 interactive multimedia tools
Lec5 interactive multimedia toolsLec5 interactive multimedia tools
Lec5 interactive multimedia toolsShona Hira
 
Lec5 interactive multimedia tools
Lec5 interactive multimedia toolsLec5 interactive multimedia tools
Lec5 interactive multimedia toolsDom Mike
 
Designing for Android - Anjan Shrestha
Designing for Android - Anjan ShresthaDesigning for Android - Anjan Shrestha
Designing for Android - Anjan ShresthaMobileNepal
 
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能Unity Technologies Japan K.K.
 
【Unite 2017 Tokyo】EditorVRの設計から学んだこと:使えるVRエディターのためのデザイン
【Unite 2017 Tokyo】EditorVRの設計から学んだこと:使えるVRエディターのためのデザイン【Unite 2017 Tokyo】EditorVRの設計から学んだこと:使えるVRエディターのためのデザイン
【Unite 2017 Tokyo】EditorVRの設計から学んだこと:使えるVRエディターのためのデザインUnite2017Tokyo
 
High DPI for desktop applications
High DPI for desktop applicationsHigh DPI for desktop applications
High DPI for desktop applicationsKirill Grouchnikov
 

Was ist angesagt? (9)

Designing Android apps for multiple screens
Designing Android apps for multiple screensDesigning Android apps for multiple screens
Designing Android apps for multiple screens
 
UX and UI Designing for all android screen
UX and UI Designing for all android screenUX and UI Designing for all android screen
UX and UI Designing for all android screen
 
Adaptive Design for Android
Adaptive Design for AndroidAdaptive Design for Android
Adaptive Design for Android
 
Lec5 interactive multimedia tools
Lec5 interactive multimedia toolsLec5 interactive multimedia tools
Lec5 interactive multimedia tools
 
Lec5 interactive multimedia tools
Lec5 interactive multimedia toolsLec5 interactive multimedia tools
Lec5 interactive multimedia tools
 
Designing for Android - Anjan Shrestha
Designing for Android - Anjan ShresthaDesigning for Android - Anjan Shrestha
Designing for Android - Anjan Shrestha
 
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
【Unite 2017 Tokyo】Unity UI最適化ガイド 〜ベストプラクティスと新機能
 
【Unite 2017 Tokyo】EditorVRの設計から学んだこと:使えるVRエディターのためのデザイン
【Unite 2017 Tokyo】EditorVRの設計から学んだこと:使えるVRエディターのためのデザイン【Unite 2017 Tokyo】EditorVRの設計から学んだこと:使えるVRエディターのためのデザイン
【Unite 2017 Tokyo】EditorVRの設計から学んだこと:使えるVRエディターのためのデザイン
 
High DPI for desktop applications
High DPI for desktop applicationsHigh DPI for desktop applications
High DPI for desktop applications
 

Ähnlich wie Creating apps that work on all screen sizes

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
 
Fernando F. Gallego - Efficient Android Resources 101
Fernando F. Gallego - Efficient Android Resources 101Fernando F. Gallego - Efficient Android Resources 101
Fernando F. Gallego - Efficient Android Resources 101Fernando Gallego
 
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
 
Beating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageBeating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageXamarin
 
Cross Device UI Designing
Cross Device UI DesigningCross Device UI Designing
Cross Device UI DesigningDeepu S Nath
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013Marc D Anderson
 
Design guidelines for android developers
Design guidelines for android developersDesign guidelines for android developers
Design guidelines for android developersQandil Tariq
 
Android training day 3
Android training day 3Android training day 3
Android training day 3Vivek Bhusal
 
Etsy - Android & Design
Etsy - Android & DesignEtsy - Android & Design
Etsy - Android & DesignDeniz Veli
 
Android webinar class_1
Android webinar class_1Android webinar class_1
Android webinar class_1Edureka!
 
Android Programming Basic
Android Programming BasicAndroid Programming Basic
Android Programming BasicDuy Do Phan
 
Application Development - Overview on Android OS
Application Development - Overview on Android OSApplication Development - Overview on Android OS
Application Development - Overview on Android OSPankaj Maheshwari
 
responsive awareness
responsive awarenessresponsive awareness
responsive awarenessonehundred_be
 
Rwd Testing Baiju Joseph
Rwd Testing Baiju JosephRwd Testing Baiju Joseph
Rwd Testing Baiju JosephvodQA
 
RWD Testing - Baiju Joseph
RWD Testing - Baiju JosephRWD Testing - Baiju Joseph
RWD Testing - Baiju JosephThoughtworks
 
Lecture 4 display_principles
Lecture 4 display_principlesLecture 4 display_principles
Lecture 4 display_principlesmoduledesign
 
Windows Phone 8 - 2 Designing WP8 Applications
Windows Phone 8 - 2 Designing WP8 ApplicationsWindows Phone 8 - 2 Designing WP8 Applications
Windows Phone 8 - 2 Designing WP8 ApplicationsOliver Scheer
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignJulia Vi
 

Ähnlich wie Creating apps that work on all screen sizes (20)

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
 
Fernando F. Gallego - Efficient Android Resources 101
Fernando F. Gallego - Efficient Android Resources 101Fernando F. Gallego - Efficient Android Resources 101
Fernando F. Gallego - Efficient Android Resources 101
 
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...
 
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
 
Cross Device UI Designing
Cross Device UI DesigningCross Device UI Designing
Cross Device UI Designing
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013
 
Design guidelines for android developers
Design guidelines for android developersDesign guidelines for android developers
Design guidelines for android developers
 
Android training day 3
Android training day 3Android training day 3
Android training day 3
 
Etsy - Android & Design
Etsy - Android & DesignEtsy - Android & Design
Etsy - Android & Design
 
Android webinar class_1
Android webinar class_1Android webinar class_1
Android webinar class_1
 
Android Programming Basic
Android Programming BasicAndroid Programming Basic
Android Programming Basic
 
Application Development - Overview on Android OS
Application Development - Overview on Android OSApplication Development - Overview on Android OS
Application Development - Overview on Android OS
 
divide and qonquer
divide and qonquerdivide and qonquer
divide and qonquer
 
responsive awareness
responsive awarenessresponsive awareness
responsive awareness
 
Rwd Testing Baiju Joseph
Rwd Testing Baiju JosephRwd Testing Baiju Joseph
Rwd Testing Baiju Joseph
 
RWD Testing - Baiju Joseph
RWD Testing - Baiju JosephRWD Testing - Baiju Joseph
RWD Testing - Baiju Joseph
 
Lecture 4 display_principles
Lecture 4 display_principlesLecture 4 display_principles
Lecture 4 display_principles
 
Windows Phone 8 - 2 Designing WP8 Applications
Windows Phone 8 - 2 Designing WP8 ApplicationsWindows Phone 8 - 2 Designing WP8 Applications
Windows Phone 8 - 2 Designing WP8 Applications
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 

Mehr von Ravi Vyas

What Product Market Fit is not
What Product Market Fit is notWhat Product Market Fit is not
What Product Market Fit is notRavi Vyas
 
Mobile Metrics and Analytics
Mobile Metrics and AnalyticsMobile Metrics and Analytics
Mobile Metrics and AnalyticsRavi Vyas
 
Key User Lifecycle Metrics for Growth & Engagement
Key User Lifecycle Metrics for Growth & EngagementKey User Lifecycle Metrics for Growth & Engagement
Key User Lifecycle Metrics for Growth & EngagementRavi Vyas
 
Android workshop
Android workshopAndroid workshop
Android workshopRavi Vyas
 
Why android first
Why android firstWhy android first
Why android firstRavi Vyas
 
Android v 1.1
Android v 1.1Android v 1.1
Android v 1.1Ravi Vyas
 
Know thy code
Know thy codeKnow thy code
Know thy codeRavi Vyas
 

Mehr von Ravi Vyas (8)

What Product Market Fit is not
What Product Market Fit is notWhat Product Market Fit is not
What Product Market Fit is not
 
Mobile Metrics and Analytics
Mobile Metrics and AnalyticsMobile Metrics and Analytics
Mobile Metrics and Analytics
 
Key User Lifecycle Metrics for Growth & Engagement
Key User Lifecycle Metrics for Growth & EngagementKey User Lifecycle Metrics for Growth & Engagement
Key User Lifecycle Metrics for Growth & Engagement
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
Why android first
Why android firstWhy android first
Why android first
 
Android v 1.1
Android v 1.1Android v 1.1
Android v 1.1
 
Know thy code
Know thy codeKnow thy code
Know thy code
 
Android
AndroidAndroid
Android
 

Kürzlich hochgeladen

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
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
 
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
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
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
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Kürzlich hochgeladen (20)

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
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
 
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?
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
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):
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Creating apps that work on all screen sizes

  • 2. • Android Developer, Project Manager at Techjini Solution Pvt Ltd • Co-Organizer of the Bangalore Android User Group • Creator of the Blrdroid logos
  • 3. Screen size • Screen density • Orientation • Resolution
  • 4. • Phones are not always • Android phones flavors : • Different screne sizes • Different screen densities • Always have a design plan for both portrait and landscape : • Landscape != Portrait + Δwidth - Δheight
  • 5. • Use the <supports-screens> tag in the manifest to specify which screens you plan to support • <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true“ />
  • 6. • You can provide different resources & layouts based on various factors like screen size , screen pixel density , orientation etc layout-land layout-port res-hdpi res-mdpi Android will handle changes by itself • Manually handle configuration changes onConfigurationChanged(Configuration newConfig) android:configChanges="keyboard|orientation"
  • 7. Do not use PX to specify size • Use rules for placement for pixel distances • Rethink, recheck your rules . • Check how alignParentLeft/Right will look on other screens
  • 9. • XML Drawables <item android:id="@android:id/background"> <shape> <corners android:radius="15dip" /> <gradient android:startColor="#ff9d9e9d" android:centerColor="#ff5a5d5a" android:centerY="0.75" android:endColor="#ff747674" android:angle="270" /> </shape> </item>
  • 10.
  • 11. • While designing the UI enter real sample data to better visualize the UI. • When displaying numbers , use the largest possible number to test • Don’t trust emulator. • Test on as many devices as possible. • Motodev Studio – Device Anywhere
  • 12. • contact@ravivyas.co m • @ravivyas84 • Ravivyas.com/+

Hinweis der Redaktion

  1. Screen size Actual physical size, measured as the screen&apos;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 example, a &quot;low&quot; density screen has fewer pixels within a given physical area, compared to a &quot;normal&quot; or &quot;high&quot; density screen.For simplicity, Android groups all actual screen densities into four generalized densities: low, medium, high, and extra high.Orientation The orientation of the screen from the user&apos;s point of view. This is either landscape or portrait, meaning that the screen&apos;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.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 &quot;medium&quot; 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&apos;s UI, to ensure proper display of your UI on screens with different densities
  2. One of the biggest thing stopping you for supporting all screens is that most people think of the phone as a candy bar , so much so that a rectangle with the small dot at the bottom is considered an icon for a phone.Android is open source thus there are so many options with so many different configurationsIts totally fine to have different layouts for landscape, so much so that you may decide to hide some components
  3. Lets you specify the screen sizes your application supports and enable screen compatibility mode for screens larger than what your application supports. It&apos;s important that you always use this element in your application to specify the screen sizes your application supports. if your application does not work well when resized to fit different screen sizes, you can use the attributes of the &lt;supports-screens&gt; element to control whether your application should be distributed to smaller screens or have its UI scaled up (&quot;zoomed&quot;) to fit larger screens using the system&apos;s screen compatibility mode.
  4. For orientation changes make sure you handle the orientation changes . Default orientation change restarts the activity
  5. PX does not scale for different screen sizesA center aligned wrapcontent image will look fine a small screen but as the screen size increases the empty space on the left and rigth will increaseDensity-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 &quot;medium&quot; 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&apos;s UI, to ensure proper display of your UI on screens with different densities
  6. They also save size
  7. &lt;size        android:width=&quot;integer&quot;        android:height=&quot;integer&quot; /&gt;    &lt;solid        android:color=&quot;color&quot; /&gt;    &lt;stroke        android:width=&quot;integer&quot;        android:color=&quot;color&quot;        android:dashWidth=&quot;integer&quot;        android:dashGap=&quot;integer&quot; /&gt;android:centerXFloat. The relative X-position for the center of the gradient (0 - 1.0).android:centerYFloat. The relative Y-position for the center of the gradient (0 - 1.0).
  8. &lt;size        android:width=&quot;integer&quot;        android:height=&quot;integer&quot; /&gt;    &lt;solid        android:color=&quot;color&quot; /&gt;    &lt;stroke        android:width=&quot;integer&quot;        android:color=&quot;color&quot;        android:dashWidth=&quot;integer&quot;        android:dashGap=&quot;integer&quot; /&gt;android:centerXFloat. The relative X-position for the center of the gradient (0 - 1.0).android:centerYFloat. The relative Y-position for the center of the gradient (0 - 1.0).
  9. &lt;size        android:width=&quot;integer&quot;        android:height=&quot;integer&quot; /&gt;    &lt;solid        android:color=&quot;color&quot; /&gt;    &lt;stroke        android:width=&quot;integer&quot;        android:color=&quot;color&quot;        android:dashWidth=&quot;integer&quot;        android:dashGap=&quot;integer&quot; /&gt;android:centerXFloat. The relative X-position for the center of the gradient (0 - 1.0).android:centerYFloat. The relative Y-position for the center of the gradient (0 - 1.0).
  10. &lt;size        android:width=&quot;integer&quot;        android:height=&quot;integer&quot; /&gt;    &lt;solid        android:color=&quot;color&quot; /&gt;    &lt;stroke        android:width=&quot;integer&quot;        android:color=&quot;color&quot;        android:dashWidth=&quot;integer&quot;        android:dashGap=&quot;integer&quot; /&gt;android:centerXFloat. The relative X-position for the center of the gradient (0 - 1.0).android:centerYFloat. The relative Y-position for the center of the gradient (0 - 1.0).