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
200
4
Share
Android Fragmentation
A brief talk given at MinneBar 2013 about the basics of battling fragmentation on Android.
Daniel Lew
April 06, 2013
More Decks by Daniel Lew
See All by Daniel Lew
What the fuck are passkeys and why are they everywhere now?
dlew
1
23
How to Use Computers (Privately!)
dlew
0
89
Finding Meaningful, Mission-Driven Work
dlew
0
180
Things Maybe You Don't Know as a Newer Developer
dlew
1
140
Maintaining Software Correctness
dlew
4
1.1k
Grokking Coroutines (MinneBar)
dlew
5
680
ClimateChangeTech.pdf
dlew
0
160
What Tech Can Do About Climate Change
dlew
0
660
Grokking Coroutines
dlew
5
1.4k
Other Decks in Programming
See All in Programming
Claude Codeをカスタムして自分だけのClaude Codeを作ろう
terisuke
0
150
Running Swift without an OS
kishikawakatsumi
0
850
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
1k
tRPCの概要と少しだけパフォーマンス
misoton665
2
240
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
670
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
3
800
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
160
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
450
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
240
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
680
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
280
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
310
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
580
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
Practical Orchestrator
shlominoach
191
11k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
430
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.9k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
SEO for Brand Visibility & Recognition
aleyda
0
4.5k
We Have a Design System, Now What?
morganepeng
55
8.1k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
110
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