Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
130
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
960
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.5k
Kotlin Fest 2019: Kotlin型実践入門
satoshun
9
6.8k
R8/ProGuard 徹底比較
satoshun
8
4.2k
Android: Daggear2でDI
satoshun
0
140
Other Decks in Programming
See All in Programming
クラウドに依存しないS3を使った開発術
simesaba80
0
170
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
280
gunshi
kazupon
1
120
Cap'n Webについて
yusukebe
0
150
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
130
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
110
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3.1k
Grafana:建立系統全知視角的捷徑
blueswen
0
220
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
4k
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
150
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
110
Optimizing for Happiness
mojombo
379
70k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
120
Ruling the World: When Life Gets Gamed
codingconduct
0
100
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
120
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
0
22
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
The untapped power of vector embeddings
frankvandijk
1
1.5k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
170
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
120
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