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
120
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
950
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.7k
R8/ProGuard 徹底比較
satoshun
8
4.2k
Android: Daggear2でDI
satoshun
0
130
Other Decks in Programming
See All in Programming
業務でAIを使いたい話
hnw
0
250
KoogではじめるAIエージェント開発
hiroaki404
1
410
Functional Calisthenics in Kotlin: Kotlinで「関数型エクササイズ」を実践しよう
lagenorhynque
0
110
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
390
Register is more than clipboard
satorunooshie
1
450
CSC509 Lecture 11
javiergs
PRO
0
300
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
660
SODA - FACT BOOK(JP)
sodainc
1
9.4k
PyCon mini 東海 2025「個人ではじめるマルチAIエージェント入門 〜LangChain × LangGraphでアイデアを形にするステップ〜」
komofr
3
890
オンデバイスAIとXcode
ryodeveloper
0
440
MCPサーバー「モディフィウス」で変更容易性の向上をスケールする / modifius
minodriven
7
1.3k
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
6.1k
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
The World Runs on Bad Software
bkeepers
PRO
72
12k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Being A Developer After 40
akosma
91
590k
Thoughts on Productivity
jonyablonski
73
4.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
192
56k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.8k
A better future with KSS
kneath
239
18k
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