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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Sato Shun
August 11, 2015
Programming
0
140
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
970
DroidKaigi 2020: System UIをコントロールして、 画面を最大限に生かしたアプリを構築する / Build apps that make the best uses of device screens by controlling System UI
satoshun
4
1.9k
タップルでたっぷりDaggerを使って マルチモジュール構築している話 :)
satoshun
2
2.6k
Kotlin Fest 2019: Kotlin型実践入門
satoshun
9
6.8k
R8/ProGuard 徹底比較
satoshun
8
4.2k
Android: Daggear2でDI
satoshun
0
150
Other Decks in Programming
See All in Programming
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
150
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1.1k
Raku Raku Notion 20260128
hareyakayuruyaka
0
400
Oxlint JS plugins
kazupon
1
1k
CSC307 Lecture 05
javiergs
PRO
0
500
Event Storming
hschwentner
3
1.3k
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
480
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2.1k
Oxlintはいいぞ
yug1224
5
1.4k
JPUG勉強会 OSSデータベースの内部構造を理解しよう
oga5
1
170
Metaprogramming isn't real, it can't hurt you
okuramasafumi
0
110
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
120
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Skip the Path - Find Your Career Trail
mkilby
0
64
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
160
Code Review Best Practice
trishagee
74
20k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
Mind Mapping
helmedeiros
PRO
1
93
HDC tutorial
michielstock
1
410
How to Talk to Developers About Accessibility
jct
2
140
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
So, you think you're a good person
axbom
PRO
2
1.9k
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