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
41
Things Maybe You Don't Know as a Newer Developer
dlew
1
87
Maintaining Software Correctness
dlew
4
690
Grokking Coroutines (MinneBar)
dlew
5
450
ClimateChangeTech.pdf
dlew
0
74
What Tech Can Do About Climate Change
dlew
0
380
Grokking Coroutines
dlew
5
930
Automated Tests Aren't Enough
dlew
0
440
The Importance of Developer Communities
dlew
0
72
Other Decks in Programming
See All in Programming
PHP 8.3で追加されたjson_validate()を徹底的に深掘りしてみよう
mashirou1234
1
730
ドメイン・ファーストで考える問題解決に役立つモデル設計 / Domain First Model Design
suzushin54
1
1.4k
Laravel標準バリデーションでできること
hmb_ok
2
360
WasmOS: Wasmを実行する自作Microkernel
riru
0
370
ここ1~2年くらいで 使えるようになった(主要ブラウザーの最新版 がすべて対応した ) ウェブの新機能について ランダムに喋る!
myzkyy
9
6.5k
Cloud RunとCloud PubSubでサーバレスなデータ基盤2024 with Terraform / Cloud Run and PubSub with Terraform
shinyorke
7
1.9k
MySQL のインデックスの種類をおさらいしよう! / overviewing indexes in MySQL
okashoi
0
170
Open Source Swift Workshop - Foundation and first party libraries
ikesyo
0
270
Building a Smaller App Binary
kateinoigakukun
2
210
Compiling Python to WebAssembly with py2wasm
syrusakbary
0
140
Parallel Socket Communication in Swift
s_shimotori
0
240
両面どころかインフラもTSでできるよ ~ 全方位TypeScriptによるプロダクト開発 ~
myfinder
8
2.3k
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
71
5.1k
JazzCon 2018 Closing Keynote - Leadership for the Reluctant Leader
reverentgeek
178
11k
Faster Mobile Websites
deanohume
296
30k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
How GitHub Uses GitHub to Build GitHub
holman
467
290k
Designing Experiences People Love
moore
135
23k
In The Pink: A Labor of Love
frogandcode
137
21k
RailsConf 2023
tenderlove
0
510
A Tale of Four Properties
chriscoyier
150
22k
What's in a price? How to price your products and services
michaelherold
236
11k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
185
15k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
6
950
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