Soumettre la recherche
Mettre en ligne
Android Fragment-Awesome
•
3 j'aime
•
2,945 vues
G
GauntFace
Suivre
A talk I gave at the Brighton iOS developer group on dealing with Android screen sizes.
Lire moins
Lire la suite
Technologie
Actualités & Politique
Signaler
Partager
Signaler
Partager
1 sur 34
Télécharger maintenant
Télécharger pour lire hors ligne
Recommandé
Mobile in a Nutshell
Mobile in a Nutshell
GauntFace
Intro to Google TV
Intro to Google TV
GauntFace
Android UI Reference
Android UI Reference
GauntFace
Introduction to fragments in android
Introduction to fragments in android
Prawesh Shrestha
Android App Development - 06 Fragments
Android App Development - 06 Fragments
Diego Grancini
Android Fragment
Android Fragment
Kan-Han (John) Lu
Android - Working with Fragments
Android - Working with Fragments
Can Elmas
Introduction to Android Fragments
Introduction to Android Fragments
Sergi Martínez
Contenu connexe
Similaire à Android Fragment-Awesome
Androidfragment
Androidfragment
Narender Singh
Introduction to mobile programming with Androids.
Introduction to mobile programming with Androids.
Maksim Golivkin
Android training day 3
Android training day 3
Vivek Bhusal
Supporting multi screen in android
Supporting multi screen in android
rffffffff007
Supporting multi screen in android cn
Supporting multi screen in android cn
rffffffff007
Android supporting multiple screen
Android supporting multiple screen
Dao Quang Anh
Introduction to Big Data and Hadoop
Introduction to Big Data and Hadoop
Edureka!
Android在多屏幕、多设备上的适配 | 布丁 任斐
Android在多屏幕、多设备上的适配 | 布丁 任斐
imShining @DevCamp
TDC2012 Android - Deixando Sua Interface mais Bonita com Shapes
TDC2012 Android - Deixando Sua Interface mais Bonita com Shapes
Suelen Carvalho
Fernando F. Gallego - Efficient Android Resources 101
Fernando F. Gallego - Efficient Android Resources 101
Fernando Gallego
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!
Mediacurrent
Does my DIV look big in this?
Does my DIV look big in this?
glen_a_smith
Hadoop Interview Questions and Answers
Hadoop Interview Questions and Answers
Big Data Interview Questions
Big Data - An Overview
Big Data - An Overview
Arvind Kalyan
Elephant in the room: A DBA's Guide to Hadoop
Elephant in the room: A DBA's Guide to Hadoop
Stuart Ainsworth
Bootstrap 3 training
Bootstrap 3 training
Vison Sunon
Breaking the oracle tie
Breaking the oracle tie
agiamas
Distributed Data Analysis with Hadoop and R - Strangeloop 2011
Distributed Data Analysis with Hadoop and R - Strangeloop 2011
Jonathan Seidman
Hadoop Developer
Hadoop Developer
Edureka!
Introduction to Big Data & Hadoop
Introduction to Big Data & Hadoop
Edureka!
Similaire à Android Fragment-Awesome
(20)
Androidfragment
Androidfragment
Introduction to mobile programming with Androids.
Introduction to mobile programming with Androids.
Android training day 3
Android training day 3
Supporting multi screen in android
Supporting multi screen in android
Supporting multi screen in android cn
Supporting multi screen in android cn
Android supporting multiple screen
Android supporting multiple screen
Introduction to Big Data and Hadoop
Introduction to Big Data and Hadoop
Android在多屏幕、多设备上的适配 | 布丁 任斐
Android在多屏幕、多设备上的适配 | 布丁 任斐
TDC2012 Android - Deixando Sua Interface mais Bonita com Shapes
TDC2012 Android - Deixando Sua Interface mais Bonita com Shapes
Fernando F. Gallego - Efficient Android Resources 101
Fernando F. Gallego - Efficient Android Resources 101
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!
Does my DIV look big in this?
Does my DIV look big in this?
Hadoop Interview Questions and Answers
Hadoop Interview Questions and Answers
Big Data - An Overview
Big Data - An Overview
Elephant in the room: A DBA's Guide to Hadoop
Elephant in the room: A DBA's Guide to Hadoop
Bootstrap 3 training
Bootstrap 3 training
Breaking the oracle tie
Breaking the oracle tie
Distributed Data Analysis with Hadoop and R - Strangeloop 2011
Distributed Data Analysis with Hadoop and R - Strangeloop 2011
Hadoop Developer
Hadoop Developer
Introduction to Big Data & Hadoop
Introduction to Big Data & Hadoop
Dernier
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
Liveplex
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
UiPathCommunity
100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization
arrow10202532yuvraj
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
D Cloud Solutions
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
Christian Posta
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
GDSC PJATK
Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024
Alexander Turgeon
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UbiTrack UK
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
shyamraj55
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IES VE
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Aijun Zhang
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
Matsuo Lab
Governance in SharePoint Premium:What's in the box?
Governance in SharePoint Premium:What's in the box?
Juan Carlos Gonzalez
UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5
DianaGray10
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
Mahmoud Rabie
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Commit University
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
Hironori Washizaki
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
IES VE
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
Tarek Kalaji
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
Jamie (Taka) Wang
Dernier
(20)
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
Valere | Digital Solutions & AI Transformation Portfolio | 2024
Valere | Digital Solutions & AI Transformation Portfolio | 2024
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
Governance in SharePoint Premium:What's in the box?
Governance in SharePoint Premium:What's in the box?
UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
Android Fragment-Awesome
1.
Android Fragment-Awesome
Matthew Gaunt
2.
Who is this
guy? • Master in Computer Science in Bristol • Senior Android Dev @ Mubaloo • Cross Platform Dev @ Future Platforms
3.
What Fragmentation?
4.
What’s coming up •
Design - I can haz pretty • Dips • Buckets? • What buckets? • The story of buckets • Tips + Examples
5.
Dips Density Independent Pixels Abstract
the screen size (think rounded corner rectangle) Never assume dip > pixels
6.
Buckets? ldpi
mdpi hdpi xhdpi
7.
What Buckets? Screen density
(ldpi, mdpi, hdpi, xhdpi) Orientation (port, land) Android Version (v4, v11) Screen size (small, normal, large, xlarge)
8.
Eeks lots of
Images
9.
How to use
Buckets • Images - [ldpi, mdpi, hdpi, xhdpi] [small, normal, large, xlarge] • Layout -[land, port] • Themes / Styles - [v4, v11] • Dimensions - [small, normal, large, xlarge]
10.
The History...
11.
The History... <port> land
1.5
12.
The History...
ldpi <port> mdpi land hdpi 1.5 1.6
13.
The History...
small ldpi normal <port> mdpi large land hdpi xlarge 1.5 1.6 3.0 (ish)
14.
The History...
small ldpi normal ldpi mdpi <port> mdpi large hdpi land hdpi xlarge xhdpi 1.5 1.6 3.0 (ish) 4.0
15.
Recap • Lots of
buckets • Lots of resources to apply the buckets to • How it relates to other platforms like iOS
16.
Random.
17.
Phones / Tablets?
ldpi mdpi hdpi xhdpi total Small 1.7% 2.4% 4.1% Normal 0.7% 18.5% 66.3% 2.5% 88.0% Large 0.2% 2.8% 3.0% XLarge 4.9% 4.9% ldpi mdpi mdpi hdpi ? hdpi ? xhdpi ? xhdpi ? Phones Tablets normal / small large / xlarge
18.
Hitting Both? drawable
For all buckets drawable-ldpi drawable-mdpi Base drawable-hdpi drawable-xhdpi drawable-large-? Additional drawable-xlarge-?
19.
Tips to Reduce
Work 1 Use values everywhere (dimens, ints, etc.)
20.
Tips to Reduce
Work values dimens.xml <resources> <dimen name="default_text_size">20sp</dimen> <dimen name="default_large_text_size">30sp</dimen> <dimen name="splash_vertical_spacing">20dp</dimen> <dimen name="gauntface_tag_bottom_spacing">20dp</dimen> <dimen name="gauntface_tag_padding">5dp</dimen> <dimen name="gauntface_tag_radius">10dp</dimen> <dimen name="splash_gauntface_progress_bar">30dp</dimen> <dimen name="generic_dialog_padding">15dp</dimen> <dimen name="generic_dialog_bg_radius">4dp</dimen> <dimen name="generic_dialog_title_spacer_height">4dp</dimen> <dimen name="generic_dialog_title_spacer_vertical_spacing">10dp</dimen> <dimen name="sync_info_padding">10dp</dimen> <dimen name="sync_info_title_text_size">35sp</dimen> <dimen name="sync_info_msg_text_size">20sp</dimen> <dimen name="sync_info_bg_radius">10dp</dimen> <dimen name="sync_info_prof_pic_radius">8dp</dimen> <dimen name="sync_info_prof_pic_size">128dp</dimen> </resources> values-land dimens.xml <resources> <dimen name="default_text_size">15sp</dimen> <dimen name="default_large_text_size">25sp</dimen> <dimen name="splash_vertical_spacing">10dp</dimen> </resources>
21.
Tips to Reduce
Work values values-land
22.
Tips to Reduce
Work 2 Learn the ways of the nine patch
23.
Tips to Reduce
Work
24.
Tips to Reduce
Work 3 Use <Shape> drawables
25.
Tips to Reduce
Work <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:angle="0" android:endColor="@color/dark_blue" android:gradientRadius="660" android:startColor="@color/splash_light_blue" android:type="radial" /> </shape>
26.
Tips to Reduce
Work
27.
Tips to Reduce
Work 4 Use Themes & Styles www.gauntface.co.uk/blog/2011/01/18/android-ui-reference
28.
Tips to Reduce
Work values themes.xml <resources> <style name="Theme.FacebookSync" parent="@style/Theme.FacebookSync.Support"> ... </style> <style name="Theme.FacebookSync.NoTitleBar"> ... </style> <style name="Theme.FacebookSync.Dialog" parent="@style/Theme.Dialog.Support"> ... </style> </resources> values-v11 themes-v11.xml <resources> <style name="Theme.FacebookSync.Support" parent="@android:style/Theme.Holo"></style> <style name="Theme.Dialog.Support" parent="@android:style/Theme.Holo.Dialog"></style> </resources> values-v4 themes-v4.xml <resources> <style name="Theme.FacebookSync.Support" parent="@android:style/Theme.NoTitleBar"></style> <style name="Theme.Dialog.Support" parent="@android:style/Theme.Dialog"></style> </resources>
29.
Tips to Reduce
Work
30.
Tips to Reduce
Work 5 Give up control - be fluid
31.
Tips to Reduce
Work Note: Not the best example ;)
32.
Tips to Reduce
Work
33.
You’re Results May
Vary
34.
Thanks :)
@gauntface matt@gauntface.co.uk
Télécharger maintenant