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
920
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
無関心の谷
kanayannet
0
180
CursorはMCPを使った方が良いぞ
taigakono
0
120
Practical Tips and Tricks for Working with Compose Multiplatform Previews (mDevCamp 2025)
stewemetal
0
130
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
240
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
770
エラーって何種類あるの?
kajitack
5
260
KotlinConf 2025 現地参加の土産話
n_takehata
0
100
都市をデータで見るってこういうこと PLATEAU属性情報入門
nokonoko1203
1
540
セキュリティマネジャー廃止とクラウドネイティブ型サンドボックス活用
kazumura
1
190
機械学習って何? 5分で解説頑張ってみる
kuroneko2828
0
220
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
760
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
240
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
41
7.3k
Writing Fast Ruby
sferik
628
61k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
43
2.4k
Music & Morning Musume
bryan
46
6.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
We Have a Design System, Now What?
morganepeng
52
7.6k
For a Future-Friendly Web
brad_frost
179
9.8k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Practical Orchestrator
shlominoach
188
11k
Done Done
chrislema
184
16k
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