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
27
Finding Meaningful, Mission-Driven Work
dlew
0
130
Things Maybe You Don't Know as a Newer Developer
dlew
1
100
Maintaining Software Correctness
dlew
4
980
Grokking Coroutines (MinneBar)
dlew
5
610
ClimateChangeTech.pdf
dlew
0
120
What Tech Can Do About Climate Change
dlew
0
600
Grokking Coroutines
dlew
5
1.2k
Automated Tests Aren't Enough
dlew
0
500
Other Decks in Programming
See All in Programming
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.8k
XP, Testing and ninja testing
m_seki
3
220
PipeCDのプラグイン化で目指すところ
warashi
1
250
5つのアンチパターンから学ぶLT設計
narihara
1
150
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
700
datadog dash 2025 LLM observability for reliability and stability
ivry_presentationmaterials
0
440
スタートアップの急成長を支えるプラットフォームエンジニアリングと組織戦略
sutochin26
0
330
Goで作る、開発・CI環境
sin392
0
190
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.5k
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
490
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
260
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
3
350
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Facilitating Awesome Meetings
lara
54
6.4k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
Embracing the Ebb and Flow
colly
86
4.7k
Designing for humans not robots
tammielis
253
25k
Side Projects
sachag
455
42k
Automating Front-end Workflow
addyosmani
1370
200k
Agile that works and the tools we love
rasmusluckow
329
21k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
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