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
190
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
Finding Meaningful, Mission-Driven Work
dlew
0
100
Things Maybe You Don't Know as a Newer Developer
dlew
1
99
Maintaining Software Correctness
dlew
4
940
Grokking Coroutines (MinneBar)
dlew
5
580
ClimateChangeTech.pdf
dlew
0
110
What Tech Can Do About Climate Change
dlew
0
580
Grokking Coroutines
dlew
5
1.2k
Automated Tests Aren't Enough
dlew
0
480
The Importance of Developer Communities
dlew
0
100
Other Decks in Programming
See All in Programming
Google Cloudとo11yで実現するアプリケーション開発者主体のDB改善
nnaka2992
1
130
TCAを用いたAmebaのリアーキテクチャ
dazy
0
230
AWS Step Functions は CDK で書こう!
konokenj
5
910
楽しく向き合う例外対応
okutsu
0
740
ABEMA iOS 大規模プロジェクトにおける段階的な技術刷新 / ABEMA iOS Technology Upgrade
akkyie
1
250
PEPCは何を変えようとしていたのか
ken7253
3
310
From the Wild into the Clouds - Laravel Meetup Talk
neverything
0
190
変化の激しい時代における、こだわりのないエンジニアの強さ
satoshi256kbyte
1
120
Jakarta EE meets AI
ivargrimstad
0
680
Kotlinの開発でも AIをいい感じに使いたい / Making the Most of AI in Kotlin Development
kohii00
5
1.9k
Swift Testingのモチベを上げたい
stoticdev
2
210
React 19アップデートのために必要なこと
uhyo
8
1.6k
Featured
See All Featured
Producing Creativity
orderedlist
PRO
344
40k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
390
GraphQLとの向き合い方2022年版
quramy
44
14k
GraphQLの誤解/rethinking-graphql
sonatard
69
10k
Done Done
chrislema
182
16k
Being A Developer After 40
akosma
89
590k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Invisible Side of Design
smashingmag
299
50k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
260
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
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: dan@mobiata.com Sunday, November 24,
13