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
53
Things Maybe You Don't Know as a Newer Developer
dlew
1
90
Maintaining Software Correctness
dlew
4
810
Grokking Coroutines (MinneBar)
dlew
5
520
ClimateChangeTech.pdf
dlew
0
89
What Tech Can Do About Climate Change
dlew
0
470
Grokking Coroutines
dlew
5
1k
Automated Tests Aren't Enough
dlew
0
450
The Importance of Developer Communities
dlew
0
83
Other Decks in Programming
See All in Programming
Cloudflare Workers x AWS Lambdaの組み合わせユースケース / Cloudflare Workers x AWS Lambda Combination Use Case
seike460
PRO
2
310
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
2
81k
CSC307 Lecture 06
javiergs
PRO
0
360
DynamoDB コスト最適化っぽいことの基本 with Terraform
kuro_kurorrr
2
250
Polarsの成長: v0.14からv1.0までの変遷と今後の展望
zerebom
1
350
AHC035解説
terryu16
0
710
入社1ヶ月でここまでやった!Findy Toolsインフラ支援の最適化
rvirus0817
6
1.4k
Namespace on read
tagomoris
2
370
How to use Macrobenchmark
veronikapj
0
160
MIERUNE BBQにおけるユーザー中心設計()
mierune
PRO
1
110
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
140
リハビリmruby
kishima
1
160
Featured
See All Featured
Building Applications with DynamoDB
mza
89
5.8k
Gamification - CAS2011
davidbonilla
78
4.9k
Statistics for Hackers
jakevdp
792
220k
What the flash - Photography Introduction
edds
65
11k
4 Signs Your Business is Dying
shpigford
178
21k
A designer walks into a library…
pauljervisheath
201
24k
How to Think Like a Performance Engineer
csswizardry
4
590
Optimizing for Happiness
mojombo
373
69k
Clear Off the Table
cherdarchuk
89
320k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
325
21k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
20
7.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
15
4.9k
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