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
910
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.5k
R8/ProGuard 徹底比較
satoshun
8
4.1k
Android: Daggear2でDI
satoshun
0
120
Other Decks in Programming
See All in Programming
tsconfigのオプションで変わる型世界
keisukeikeda
1
130
型安全なDrag and Dropの設計を考える
yudppp
5
660
💎 My RubyKaigi Effect in 2025: Top Ruby Companies 🌐
yasulab
PRO
1
130
「MCPを使ってる人」が より詳しくなるための解説
yamaguchidesu
0
590
Efficiency and Rock 'n’ Roll (Really!)
hollycummins
0
590
Babylon.js 8.0のアプデ情報を 軽率にキャッチアップ / catch-up-babylonjs-8
drumath2237
0
110
Language Server と喋ろう – TSKaigi 2025
pizzacat83
2
660
Use Perl as Better Shell Script
karupanerura
0
650
Cloudflare Realtime と Workers でつくるサーバーレス WebRTC
nekoya3
0
230
がんばりすぎないコーディングルール運用術
tsukakei
1
180
テスト分析入門/Test Analysis Tutorial
goyoki
11
2.7k
Practical Domain-Driven Design - Workshop at NDC 2025
mufrid
0
130
Featured
See All Featured
Docker and Python
trallard
44
3.4k
Visualization
eitanlees
146
16k
GraphQLとの向き合い方2022年版
quramy
46
14k
Typedesign – Prime Four
hannesfritz
41
2.6k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
What's in a price? How to price your products and services
michaelherold
245
12k
Six Lessons from altMBA
skipperchong
28
3.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Writing Fast Ruby
sferik
628
61k
Documentation Writing (for coders)
carmenintech
71
4.8k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
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