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
210
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
53
How to Use Computers (Privately!)
dlew
0
110
Finding Meaningful, Mission-Driven Work
dlew
0
200
Things Maybe You Don't Know as a Newer Developer
dlew
1
150
Maintaining Software Correctness
dlew
4
1.1k
Grokking Coroutines (MinneBar)
dlew
5
700
ClimateChangeTech.pdf
dlew
0
170
What Tech Can Do About Climate Change
dlew
0
680
Grokking Coroutines
dlew
5
1.4k
Other Decks in Programming
See All in Programming
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
4.7k
ふつうのFeature Flag実践入門
irof
7
4k
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
110
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
120
Oxcを導入して開発体験が向上した話
yug1224
4
310
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.7k
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
260
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
6
1.1k
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
340
Inside Stream API
skrb
1
720
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
140
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
220
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
430
Mind Mapping
helmedeiros
PRO
1
250
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Accessibility Awareness
sabderemane
1
140
Building the Perfect Custom Keyboard
takai
2
790
The SEO Collaboration Effect
kristinabergwall1
1
490
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
300
The untapped power of vector embeddings
frankvandijk
2
1.8k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
BBQ
matthewcrist
89
10k
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