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
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
980
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.9k
R8/ProGuard 徹底比較
satoshun
8
4.2k
Android: Daggear2でDI
satoshun
0
160
Other Decks in Programming
See All in Programming
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
180
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
150
TipKitTips
ktcryomm
0
140
Beyond the Basics: Signal Forms
manfredsteyer
PRO
0
110
2026/02/04 AIキャラクター人格の実装論 口 調の模倣から、コンテキスト制御による 『思想』と『行動』の創発へ
sr2mg4
0
660
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
8
2.2k
AI巻き込み型コードレビューのススメ
nealle
2
2.5k
ぼくの開発環境2026
yuzneri
1
290
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
12
7k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
360
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
410
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.2k
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
190
エンジニアに許された特別な時間の終わり
watany
106
240k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
64
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
480
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
200
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Code Reviewing Like a Champion
maltzj
528
40k
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