SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
Android Talks #3
Android Design Best Practices - for
Designers and Developers
Marko Vitas
Scope
• Motivation!
• Supporting multiple screen sizes!
• Smart & flexible design approach !
• Custom components
Motivation
• Tired of not knowing what dpi, dp and sp mean?!
• Having nightmares of “little” design changes that
affect the whole app? (fonts? styles? themes?) !
• Designers and developers, lets make each others
life better.!
• Lets define a standard
Supporting Multiple
Screen Sizes
How Do Designers Prepare Materials?
• Vector graphics !
• Scale up/down!
• Exporting graphics for different screen densities!
• What does all of this mean for Android?
dpi
• screen density = horizontal width (resolution in px) /
actual physical size in inches!
• dpi (dots per inch) i.e. ppi (pixels per inch)!
• density buckets: 120,160, 240, 320, 480, 640 

3 : 4 : 6 : 8 : 12 : 16!
• tvdpi 213dpi
dp
• A virtual pixel unit !
• Use when defining UI layout, to express layout
dimensions or position in a density-independent way.!
• pixels = dps * (density / 160)!
• Designers use the baseline (mdpi) density !
• Developers use the exported screens and calculate
the width & height in pixels which map directly to dp
sp (I)
• dp has constant ratio transition dp = px * ratio.!
• sp = px * ratio * scale.!
• sp = dp * scale!
• Accessibility purpose!
• User system settings in display —> fonts
sp (II)
dpi / dp / sp
Smart & Flexible
Design Approach
Layout Types (I) Linear
Layout Types (II) - Relative
Drawables
• Animation drawable!
• Transition drawable!
• Level list drawable!
• Selector drawable !
• Graphic!
• 9Patch
9patch
• Click within the 1-pixel perimeter to draw the lines that
define the stretchable patches and (optional) content area.
• Left & top to
define stretchable
area!
• Bottom & right
content area
• Examples of android:scaleType attribute. Top row (l-r) center,
centerCrop, centerInside. Bottom row (l-r): fitCenter, fitStart, fitEnd, fitXY.
Styles
• Inheritance
Attributes
• You can define attributes in the top <resources> element or inside of a
<declare-styleable> element. Note, all attributes share the same global
namespace.
Themes
• Inheritance!
• Watch out for API level!
• Define themes in values, values-v11, values-v14!
• Check out Sherlock themes
Dimen
• Dimen values are useful to define !
• Bool!
• Color!
• Dimension - dp/sp/pt/px/mm/in!
• ID!
• Integer!
• Integer Array!
• Typed Array
Project Resource Structure (I)
• Drawable-hpdi…!
• Layout-hdpi…, !
• Layout-port and layout-land!
• Values-hdpi…!
• Concatenating configurations - layout-sw600dp-land!
• Layout-sw600dp - declaring tablet layouts in reference
Project Resource Structure (II)
Project Resource Structure (III)
Fonts
• Static init in onCreate in Application class!
!
!
!
!
Custom components
Custom View
Custom Sexy Component
Canvas And Custom Components
Developer
Options
Conclusion (I)
• New rule: in exported screens 1px equals 1dp. Our designers
are designing for 160 dpi screens, which is the baseline for
density for the Android OS!
• Use Preview to calculate distances between objects in the layout!
• Develop the app taking into consideration that a font could
change!
• Use styles!
• Use attributes in order to be able to switch styles in themes and
add custom data to your views
Conclusion (II)
• Standardise frequently used component’s dimensions!
• Example: list items, dashboard items, specific screen
dimensions like Settings screen, Drawer menu items
etc.!
• Create custom styles and views for these components!
• Use wisely
References (|)
• http://android-holo-colors.com/!
• http://coh.io/adpi/!
• http://blog.edwinevans.me/?p=131!
• http://developer.android.com/training/basics/supporting-
devices/screens.html!
• http://blog.edwinevans.me/?p=131!
• https://developer.android.com/training/displaying-bitmaps/
manage-memory.html
References (||)
• Holo-colors plugin —> https://github.com/jeromevdl/android-holo-colors-
idea-plugin!
• http://android-holo-colors.com/!
• ImageView —> http://www.peachpit.com/articles/article.aspx?
p=1846580&seqNum=2!
• http://developer.android.com/guide/practices/
screens_support.html#DeclaringTabletLayouts!
• http://developer.android.com/design/patterns/settings.html!
• http://developer.android.com/guide/topics/resources/providing-
resources.html
?
Marko Vitas, @vitongs

Contenu connexe

Similaire à Infinum Android Talks #03 - Android Design Best Practices - for Designers and Developers

Advanced Android Design Implementation
Advanced Android Design ImplementationAdvanced Android Design Implementation
Advanced Android Design ImplementationTack Mobile
 
Adaptive Design for Android
Adaptive Design for AndroidAdaptive Design for Android
Adaptive Design for AndroidNi Yan
 
Consistent UI Across Android Devices
Consistent UI Across Android DevicesConsistent UI Across Android Devices
Consistent UI Across Android DevicesIrene Duke
 
Game design & development
Game design & developmentGame design & development
Game design & developmentHemanth Sharma
 
Coding for different resolutions
Coding for different resolutionsCoding for different resolutions
Coding for different resolutionsRobin Srivastava
 
Lidar_profil_tool_2015
Lidar_profil_tool_2015Lidar_profil_tool_2015
Lidar_profil_tool_2015Ion Grigoras
 
Building a Flexible UI with Oracle ApEx
Building a Flexible UI with Oracle ApExBuilding a Flexible UI with Oracle ApEx
Building a Flexible UI with Oracle ApExBradley Brown
 
Multilingual Content: Presentation from DrupalCamp Montreal 2012
Multilingual Content: Presentation from DrupalCamp Montreal 2012Multilingual Content: Presentation from DrupalCamp Montreal 2012
Multilingual Content: Presentation from DrupalCamp Montreal 2012Suzanne Dergacheva
 
Android User Interface Design
Android User Interface Design Android User Interface Design
Android User Interface Design Ahmad Firoz
 
Creating a CSS and JS design system from the ground up
Creating a CSS and JS design system from the ground upCreating a CSS and JS design system from the ground up
Creating a CSS and JS design system from the ground upAndrew Dover
 
Games Design 2 - Lecture 10 - Game Interface Prototyping
Games Design 2 - Lecture 10 - Game Interface PrototypingGames Design 2 - Lecture 10 - Game Interface Prototyping
Games Design 2 - Lecture 10 - Game Interface PrototypingDavid Farrell
 
Making Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceMaking Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceAdrian Roselli
 
Beyond Sharing: Open Source Design
Beyond Sharing: Open Source DesignBeyond Sharing: Open Source Design
Beyond Sharing: Open Source DesignMushon Zer-Aviv
 
Good Graphic design and an Introduction to Inkscape
Good Graphic design and an Introduction to InkscapeGood Graphic design and an Introduction to Inkscape
Good Graphic design and an Introduction to InkscapeOmar Mohammad
 
Multilingual Content in Drupal 7 & 8 at DrupalCon Munich
Multilingual Content in Drupal 7 & 8 at DrupalCon MunichMultilingual Content in Drupal 7 & 8 at DrupalCon Munich
Multilingual Content in Drupal 7 & 8 at DrupalCon MunichSuzanne Dergacheva
 

Similaire à Infinum Android Talks #03 - Android Design Best Practices - for Designers and Developers (20)

Chapter 9 - Resources System
Chapter 9 - Resources SystemChapter 9 - Resources System
Chapter 9 - Resources System
 
Lecture3
Lecture3Lecture3
Lecture3
 
UI and UX for Mobile Developers
UI and UX for Mobile DevelopersUI and UX for Mobile Developers
UI and UX for Mobile Developers
 
Advanced Android Design Implementation
Advanced Android Design ImplementationAdvanced Android Design Implementation
Advanced Android Design Implementation
 
Adaptive Design for Android
Adaptive Design for AndroidAdaptive Design for Android
Adaptive Design for Android
 
Consistent UI Across Android Devices
Consistent UI Across Android DevicesConsistent UI Across Android Devices
Consistent UI Across Android Devices
 
Game design & development
Game design & developmentGame design & development
Game design & development
 
Coding for different resolutions
Coding for different resolutionsCoding for different resolutions
Coding for different resolutions
 
Android for Beginners
Android  for BeginnersAndroid  for Beginners
Android for Beginners
 
Lidar_profil_tool_2015
Lidar_profil_tool_2015Lidar_profil_tool_2015
Lidar_profil_tool_2015
 
Online File Formats.pptx
Online File Formats.pptxOnline File Formats.pptx
Online File Formats.pptx
 
Building a Flexible UI with Oracle ApEx
Building a Flexible UI with Oracle ApExBuilding a Flexible UI with Oracle ApEx
Building a Flexible UI with Oracle ApEx
 
Multilingual Content: Presentation from DrupalCamp Montreal 2012
Multilingual Content: Presentation from DrupalCamp Montreal 2012Multilingual Content: Presentation from DrupalCamp Montreal 2012
Multilingual Content: Presentation from DrupalCamp Montreal 2012
 
Android User Interface Design
Android User Interface Design Android User Interface Design
Android User Interface Design
 
Creating a CSS and JS design system from the ground up
Creating a CSS and JS design system from the ground upCreating a CSS and JS design system from the ground up
Creating a CSS and JS design system from the ground up
 
Games Design 2 - Lecture 10 - Game Interface Prototyping
Games Design 2 - Lecture 10 - Game Interface PrototypingGames Design 2 - Lecture 10 - Game Interface Prototyping
Games Design 2 - Lecture 10 - Game Interface Prototyping
 
Making Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceMaking Your Site Printable: Booster Conference
Making Your Site Printable: Booster Conference
 
Beyond Sharing: Open Source Design
Beyond Sharing: Open Source DesignBeyond Sharing: Open Source Design
Beyond Sharing: Open Source Design
 
Good Graphic design and an Introduction to Inkscape
Good Graphic design and an Introduction to InkscapeGood Graphic design and an Introduction to Inkscape
Good Graphic design and an Introduction to Inkscape
 
Multilingual Content in Drupal 7 & 8 at DrupalCon Munich
Multilingual Content in Drupal 7 & 8 at DrupalCon MunichMultilingual Content in Drupal 7 & 8 at DrupalCon Munich
Multilingual Content in Drupal 7 & 8 at DrupalCon Munich
 

Plus de Infinum

Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...
Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...
Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...Infinum
 
Infinum Android Talks #20 - DiffUtil
Infinum Android Talks #20 - DiffUtilInfinum Android Talks #20 - DiffUtil
Infinum Android Talks #20 - DiffUtilInfinum
 
Infinum Android Talks #20 - Benefits of using Kotlin
Infinum Android Talks #20 - Benefits of using KotlinInfinum Android Talks #20 - Benefits of using Kotlin
Infinum Android Talks #20 - Benefits of using KotlinInfinum
 
Infinum iOS Talks #4 - Making our VIPER more reactive
Infinum iOS Talks #4 - Making our VIPER more reactiveInfinum iOS Talks #4 - Making our VIPER more reactive
Infinum iOS Talks #4 - Making our VIPER more reactiveInfinum
 
Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...
Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...
Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...Infinum
 
Infinum Android Talks #13 - Using ViewDragHelper
Infinum Android Talks #13 - Using ViewDragHelperInfinum Android Talks #13 - Using ViewDragHelper
Infinum Android Talks #13 - Using ViewDragHelperInfinum
 
Infinum Android Talks #14 - Log4j
Infinum Android Talks #14 - Log4jInfinum Android Talks #14 - Log4j
Infinum Android Talks #14 - Log4jInfinum
 
Infinum Android Talks #9 - Making your app location-aware
Infinum Android Talks #9 - Making your app location-awareInfinum Android Talks #9 - Making your app location-aware
Infinum Android Talks #9 - Making your app location-awareInfinum
 
Infinum Android Talks #14 - Gradle plugins
Infinum Android Talks #14 - Gradle pluginsInfinum Android Talks #14 - Gradle plugins
Infinum Android Talks #14 - Gradle pluginsInfinum
 
Infinum Android Talks #14 - Facebook for Android API
Infinum Android Talks #14 - Facebook for Android APIInfinum Android Talks #14 - Facebook for Android API
Infinum Android Talks #14 - Facebook for Android APIInfinum
 
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...Infinum
 
Infinum Android Talks #18 - Create fun lists by Ivan Marić
Infinum Android Talks #18 - Create fun lists by Ivan MarićInfinum Android Talks #18 - Create fun lists by Ivan Marić
Infinum Android Talks #18 - Create fun lists by Ivan MarićInfinum
 
Infinum Android Talks #18 - In-app billing by Ivan Marić
Infinum Android Talks #18 - In-app billing by Ivan MarićInfinum Android Talks #18 - In-app billing by Ivan Marić
Infinum Android Talks #18 - In-app billing by Ivan MarićInfinum
 
Infinum Android Talks #18 - How to cache like a boss by Željko Plesac
Infinum Android Talks #18 - How to cache like a boss by Željko PlesacInfinum Android Talks #18 - How to cache like a boss by Željko Plesac
Infinum Android Talks #18 - How to cache like a boss by Željko PlesacInfinum
 
Infinum iOS Talks #2 - VIPER for everybody by Damjan Vujaklija
Infinum iOS Talks #2 - VIPER for everybody by Damjan VujaklijaInfinum iOS Talks #2 - VIPER for everybody by Damjan Vujaklija
Infinum iOS Talks #2 - VIPER for everybody by Damjan VujaklijaInfinum
 
Infinum iOS Talks #2 - Xamarin by Ivan Đikić
Infinum iOS Talks #2 - Xamarin by Ivan ĐikićInfinum iOS Talks #2 - Xamarin by Ivan Đikić
Infinum iOS Talks #2 - Xamarin by Ivan ĐikićInfinum
 
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho PolutaInfinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho PolutaInfinum
 
Infinum iOS Talks #1 - Swift done right by Ivan Dikic
Infinum iOS Talks #1 - Swift done right by Ivan DikicInfinum iOS Talks #1 - Swift done right by Ivan Dikic
Infinum iOS Talks #1 - Swift done right by Ivan DikicInfinum
 
Infinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran Burojevic
Infinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran BurojevicInfinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran Burojevic
Infinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran BurojevicInfinum
 
Infinum Android Talks #17 - Testing your Android applications by Ivan Kust
Infinum Android Talks #17 - Testing your Android applications by Ivan KustInfinum Android Talks #17 - Testing your Android applications by Ivan Kust
Infinum Android Talks #17 - Testing your Android applications by Ivan KustInfinum
 

Plus de Infinum (20)

Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...
Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...
Infinum Android Talks #20 - Making your Android apps fast like Blue Runner an...
 
Infinum Android Talks #20 - DiffUtil
Infinum Android Talks #20 - DiffUtilInfinum Android Talks #20 - DiffUtil
Infinum Android Talks #20 - DiffUtil
 
Infinum Android Talks #20 - Benefits of using Kotlin
Infinum Android Talks #20 - Benefits of using KotlinInfinum Android Talks #20 - Benefits of using Kotlin
Infinum Android Talks #20 - Benefits of using Kotlin
 
Infinum iOS Talks #4 - Making our VIPER more reactive
Infinum iOS Talks #4 - Making our VIPER more reactiveInfinum iOS Talks #4 - Making our VIPER more reactive
Infinum iOS Talks #4 - Making our VIPER more reactive
 
Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...
Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...
Infinum iOS Talks #4 - Making your Swift networking code more awesome with Re...
 
Infinum Android Talks #13 - Using ViewDragHelper
Infinum Android Talks #13 - Using ViewDragHelperInfinum Android Talks #13 - Using ViewDragHelper
Infinum Android Talks #13 - Using ViewDragHelper
 
Infinum Android Talks #14 - Log4j
Infinum Android Talks #14 - Log4jInfinum Android Talks #14 - Log4j
Infinum Android Talks #14 - Log4j
 
Infinum Android Talks #9 - Making your app location-aware
Infinum Android Talks #9 - Making your app location-awareInfinum Android Talks #9 - Making your app location-aware
Infinum Android Talks #9 - Making your app location-aware
 
Infinum Android Talks #14 - Gradle plugins
Infinum Android Talks #14 - Gradle pluginsInfinum Android Talks #14 - Gradle plugins
Infinum Android Talks #14 - Gradle plugins
 
Infinum Android Talks #14 - Facebook for Android API
Infinum Android Talks #14 - Facebook for Android APIInfinum Android Talks #14 - Facebook for Android API
Infinum Android Talks #14 - Facebook for Android API
 
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
Infinum Android Talks #19 - Stop wasting time fixing bugs with TDD by Domagoj...
 
Infinum Android Talks #18 - Create fun lists by Ivan Marić
Infinum Android Talks #18 - Create fun lists by Ivan MarićInfinum Android Talks #18 - Create fun lists by Ivan Marić
Infinum Android Talks #18 - Create fun lists by Ivan Marić
 
Infinum Android Talks #18 - In-app billing by Ivan Marić
Infinum Android Talks #18 - In-app billing by Ivan MarićInfinum Android Talks #18 - In-app billing by Ivan Marić
Infinum Android Talks #18 - In-app billing by Ivan Marić
 
Infinum Android Talks #18 - How to cache like a boss by Željko Plesac
Infinum Android Talks #18 - How to cache like a boss by Željko PlesacInfinum Android Talks #18 - How to cache like a boss by Željko Plesac
Infinum Android Talks #18 - How to cache like a boss by Željko Plesac
 
Infinum iOS Talks #2 - VIPER for everybody by Damjan Vujaklija
Infinum iOS Talks #2 - VIPER for everybody by Damjan VujaklijaInfinum iOS Talks #2 - VIPER for everybody by Damjan Vujaklija
Infinum iOS Talks #2 - VIPER for everybody by Damjan Vujaklija
 
Infinum iOS Talks #2 - Xamarin by Ivan Đikić
Infinum iOS Talks #2 - Xamarin by Ivan ĐikićInfinum iOS Talks #2 - Xamarin by Ivan Đikić
Infinum iOS Talks #2 - Xamarin by Ivan Đikić
 
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho PolutaInfinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
 
Infinum iOS Talks #1 - Swift done right by Ivan Dikic
Infinum iOS Talks #1 - Swift done right by Ivan DikicInfinum iOS Talks #1 - Swift done right by Ivan Dikic
Infinum iOS Talks #1 - Swift done right by Ivan Dikic
 
Infinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran Burojevic
Infinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran BurojevicInfinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran Burojevic
Infinum iOS Talks #1 - Becoming an iOS developer swiftly by Vedran Burojevic
 
Infinum Android Talks #17 - Testing your Android applications by Ivan Kust
Infinum Android Talks #17 - Testing your Android applications by Ivan KustInfinum Android Talks #17 - Testing your Android applications by Ivan Kust
Infinum Android Talks #17 - Testing your Android applications by Ivan Kust
 

Dernier

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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
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
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
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
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
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
 
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
 

Dernier (20)

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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
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
 
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
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
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
 
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?
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
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
 
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
 

Infinum Android Talks #03 - Android Design Best Practices - for Designers and Developers

  • 1. Android Talks #3 Android Design Best Practices - for Designers and Developers Marko Vitas
  • 2. Scope • Motivation! • Supporting multiple screen sizes! • Smart & flexible design approach ! • Custom components
  • 3. Motivation • Tired of not knowing what dpi, dp and sp mean?! • Having nightmares of “little” design changes that affect the whole app? (fonts? styles? themes?) ! • Designers and developers, lets make each others life better.! • Lets define a standard
  • 5. How Do Designers Prepare Materials? • Vector graphics ! • Scale up/down! • Exporting graphics for different screen densities! • What does all of this mean for Android?
  • 6. dpi • screen density = horizontal width (resolution in px) / actual physical size in inches! • dpi (dots per inch) i.e. ppi (pixels per inch)! • density buckets: 120,160, 240, 320, 480, 640 
 3 : 4 : 6 : 8 : 12 : 16! • tvdpi 213dpi
  • 7. dp • A virtual pixel unit ! • Use when defining UI layout, to express layout dimensions or position in a density-independent way.! • pixels = dps * (density / 160)! • Designers use the baseline (mdpi) density ! • Developers use the exported screens and calculate the width & height in pixels which map directly to dp
  • 8. sp (I) • dp has constant ratio transition dp = px * ratio.! • sp = px * ratio * scale.! • sp = dp * scale! • Accessibility purpose! • User system settings in display —> fonts
  • 10. dpi / dp / sp
  • 13. Layout Types (II) - Relative
  • 14. Drawables • Animation drawable! • Transition drawable! • Level list drawable! • Selector drawable ! • Graphic! • 9Patch
  • 15. 9patch • Click within the 1-pixel perimeter to draw the lines that define the stretchable patches and (optional) content area. • Left & top to define stretchable area! • Bottom & right content area
  • 16. • Examples of android:scaleType attribute. Top row (l-r) center, centerCrop, centerInside. Bottom row (l-r): fitCenter, fitStart, fitEnd, fitXY.
  • 18. Attributes • You can define attributes in the top <resources> element or inside of a <declare-styleable> element. Note, all attributes share the same global namespace.
  • 19. Themes • Inheritance! • Watch out for API level! • Define themes in values, values-v11, values-v14! • Check out Sherlock themes
  • 20. Dimen • Dimen values are useful to define ! • Bool! • Color! • Dimension - dp/sp/pt/px/mm/in! • ID! • Integer! • Integer Array! • Typed Array
  • 21. Project Resource Structure (I) • Drawable-hpdi…! • Layout-hdpi…, ! • Layout-port and layout-land! • Values-hdpi…! • Concatenating configurations - layout-sw600dp-land! • Layout-sw600dp - declaring tablet layouts in reference
  • 24. Fonts • Static init in onCreate in Application class! ! ! ! !
  • 28. Canvas And Custom Components
  • 30. Conclusion (I) • New rule: in exported screens 1px equals 1dp. Our designers are designing for 160 dpi screens, which is the baseline for density for the Android OS! • Use Preview to calculate distances between objects in the layout! • Develop the app taking into consideration that a font could change! • Use styles! • Use attributes in order to be able to switch styles in themes and add custom data to your views
  • 31. Conclusion (II) • Standardise frequently used component’s dimensions! • Example: list items, dashboard items, specific screen dimensions like Settings screen, Drawer menu items etc.! • Create custom styles and views for these components! • Use wisely
  • 32. References (|) • http://android-holo-colors.com/! • http://coh.io/adpi/! • http://blog.edwinevans.me/?p=131! • http://developer.android.com/training/basics/supporting- devices/screens.html! • http://blog.edwinevans.me/?p=131! • https://developer.android.com/training/displaying-bitmaps/ manage-memory.html
  • 33. References (||) • Holo-colors plugin —> https://github.com/jeromevdl/android-holo-colors- idea-plugin! • http://android-holo-colors.com/! • ImageView —> http://www.peachpit.com/articles/article.aspx? p=1846580&seqNum=2! • http://developer.android.com/guide/practices/ screens_support.html#DeclaringTabletLayouts! • http://developer.android.com/design/patterns/settings.html! • http://developer.android.com/guide/topics/resources/providing- resources.html