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: Introduction Android Support Annotations
Search
Sato Shun
August 11, 2015
Programming
0
110
Android: Introduction Android Support Annotations
Sato Shun
August 11, 2015
Tweet
Share
More Decks by Sato Shun
See All by Sato Shun
Kotlin Nativeにおけるfrozen状態と並行処理について
satoshun
0
890
DroidKaigi 2020: System UIをコントロールして、 画面を最大限に生かしたアプリを構築する / Build apps that make the best uses of device screens by controlling System UI
satoshun
4
1.8k
タップルでたっぷりDaggerを使って マルチモジュール構築している話 :)
satoshun
2
2.4k
Kotlin Fest 2019: Kotlin型実践入門
satoshun
9
6.3k
R8/ProGuard 徹底比較
satoshun
8
4k
Android: Daggear2でDI
satoshun
0
110
Other Decks in Programming
See All in Programming
Datadog Workflow Automation で圧倒的価値提供
showwin
1
310
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
1
240
Honoとフロントエンドの 型安全性について
yodaka
7
1.5k
LINE messaging APIを使ってGoogleカレンダーと連携した予約ツールを作ってみた
takumakoike
0
130
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
160
ナレッジイネイブリングにAIを活用してみる ゆるSRE勉強会 #9
nealle
0
170
AIレビュー導入によるCIツールとの共存と最適化
kamo26sima
1
640
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
260
Google Cloudとo11yで実現するアプリケーション開発者主体のDB改善
nnaka2992
1
110
ML.NETで始める機械学習
ymd65536
0
240
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
620
Rubyと自由とAIと
yotii23
6
1.9k
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Side Projects
sachag
452
42k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
We Have a Design System, Now What?
morganepeng
51
7.4k
Six Lessons from altMBA
skipperchong
27
3.6k
Speed Design
sergeychernyshev
28
820
Transcript
Android Support Annotationsの紹介 potatotips#20 2015/8/11 佐藤 隼
Jake先生のRxBindingリポジトリを見てみると...
Android Support Annotations? Android開発において, 役に立つannotationが 定義されているライブラリ
IntDef/StringDef 複数の定数から, 論理的な型を宣言 enumの代わりに使う. 列挙パターンにenumを使うのはバッドプ ラクティス
IntRange/FloatRange 定義域を宣言
Size 配列のサイズを宣言(min, maxも可)
RequiresPermission 呼び出すのに必要なpermissionを宣言
CallSuper サブクラスがメソッドを呼び出さなければならないこ とを宣言
UiThread/WorkerThread UI(Worker)スレッドか ら呼び出さなければな らないことを宣言
- LayoutRes, StringRes, ColorRes, … - 特定のresourceのみを受け入れることを宣言 - Keep -
proguardを無視することを宣言 - CheckResult - 返り値を使わなければいけない - VisibleForTesting - testのためにaccess可視性を広げていることを宣言 - Nullable, NonNull - Nullを許さない(許す)ことを宣言.
- 適切にannotationをつけることで, ドキュメント の一部になると共に, バグの軽減が期待できる - Kotlinの波がキテる? まとめ
参考 - https://developer.android. com/intl/ja/tools/debugging/annota tions.html - http://tools.android.com/tech- docs/support-annotations