Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Android Fragmentation
Search
Daniel Lew
April 06, 2013
Programming
4
200
Android Fragmentation
A brief talk given at MinneBar 2013 about the basics of battling fragmentation on Android.
Daniel Lew
April 06, 2013
Tweet
Share
More Decks by Daniel Lew
See All by Daniel Lew
How to Use Computers (Privately!)
dlew
0
41
Finding Meaningful, Mission-Driven Work
dlew
0
140
Things Maybe You Don't Know as a Newer Developer
dlew
1
110
Maintaining Software Correctness
dlew
4
1k
Grokking Coroutines (MinneBar)
dlew
5
630
ClimateChangeTech.pdf
dlew
0
130
What Tech Can Do About Climate Change
dlew
0
620
Grokking Coroutines
dlew
5
1.2k
Automated Tests Aren't Enough
dlew
0
510
Other Decks in Programming
See All in Programming
Leading Effective Engineering Teams in the AI Era
addyosmani
7
480
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
0
2k
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
1
690
CSC509 Lecture 03
javiergs
PRO
0
340
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
280
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1.1k
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
350
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
6.9k
Things You Thought You Didn’t Need To Care About That Have a Big Impact On Your Job
hollycummins
0
230
(Extension DC 2025) Actor境界を越える技術
teamhimeh
1
260
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
3
660
iOSでSVG画像を扱う
kishikawakatsumi
0
110
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Thoughts on Productivity
jonyablonski
70
4.9k
Bash Introduction
62gerente
615
210k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
The Pragmatic Product Professional
lauravandoore
36
6.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
980
Music & Morning Musume
bryan
46
6.8k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Transcript
Android Fragmentation Daniel Lew 4/6/2013 Sunday, November 24, 13
Problem • There too many phones! • Afraid to enter
the Android arena? • There are solutions to most problems! Sunday, November 24, 13
Compatible Screens Sunday, November 24, 13
Source: Kirill Grouchnikov, Google Sunday, November 24, 13
Screen Break Points • Determine when to switch from one
layout to another • Can break on fragments or custom views. Sunday, November 24, 13
Play Store Break Points Sunday, November 24, 13
Play Store Break Points Sunday, November 24, 13
Play Store Break Points Sunday, November 24, 13
Play Store Break Points Sunday, November 24, 13
Fragments • Can be rearranged across different screen sizes •
Can be reused Sunday, November 24, 13
Fragments - Rearranged Sunday, November 24, 13
Fragments - Rearranged Sunday, November 24, 13
Custom Views • Collection of standard Views, wrapped in a
custom View • Customize for each configuration Sunday, November 24, 13
Sunday, November 24, 13
Sunday, November 24, 13
Sunday, November 24, 13
Compatible Code Sunday, November 24, 13
Reflection • Standard Java reflection • Only run code if
the Class/Method exists Sunday, November 24, 13
Branched Code • Build.VERSION.SDK_INT if (Build.VERSION.SDK_INT >=9) // Run code
only available on API 9+ • Android 2.2+ does not cause VerifyErrors if unavailable classes/methods are never run. Sunday, November 24, 13
Proxy Classes • Create a class that encapsulates switched code
• Class uses either reflection or branching • Access class without caring about which version of Android you are running Sunday, November 24, 13
Backwards-Compatible Libraries Sunday, November 24, 13
Android Support Library • Google provided library • Supports Fragments,
LoaderManager, Notifications, Sharing • Includes classes not in vanilla Android (Pagers) • http://developer.android.com/tools/extras/ support-library.html Sunday, November 24, 13
ActionBarSherlock • Action bars pre-3.0 • Well supported • http://actionbarsherlock.com/
Sunday, November 24, 13
NineOldAndroids • Backwards-compatible property animation library • All old animations
aren't performant, but better than nothing. • http://nineoldandroids.com/ Sunday, November 24, 13
HoloEverywhere • Consistent theming across devices • https://github.com/Prototik/ HoloEverywhere •
If you don't want a library, import from Android Open Source Project itself. Sunday, November 24, 13
Resource Qualifiers • All files under /res/ are resources •
Format: /res/<type>- <qualifier>/ • Qualifiers can be applied to any resource Sunday, November 24, 13
Useful Resource Qualifiers • Orientation • -landscape, -portrait • Screen
size • -small, -medium, -large, -xlarge • -sw600dp, -sh900dp, etc. • Platform • -v11, -v14, etc. Sunday, November 24, 13
What to Qualify • Layouts • Dimensions (and integers) •
Booleans • Styles and themes Sunday, November 24, 13
Links • Blog: http://daniel-codes.blogspot.com/ • Email:
[email protected]
Sunday, November 24,
13