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
乱雑なコードの整理から学ぶ設計の初歩
masuda220
PRO
32
13k
CSC509 Lecture 11
javiergs
PRO
0
310
「10分以内に機能を消せる状態」 の実現のためにやっていること
togishima
1
500
Kotlinで実装するCPU/GPU 「協調的」パフォーマンス管理
matuyuhi
0
410
しっかり学ぶ java.lang.*
nagise
1
380
高単価案件で働くための心構え
nullnull
0
150
早すぎ?超先読み Go 1.26 Draft - Preview the contents of the Go 1.26 Draft Release Notes
tomtwinkle
0
290
Eloquentを使ってどこまでコードの治安を保てるのか?を新人が考察してみた
itokoh0405
0
3.2k
AIと協働し、イベントソーシングとアクターモデルで作る後悔しないアーキテクチャ Regret-Free Architecture with AI, Event Sourcing, and Actors
tomohisa
2
1.5k
Chart.jsで長い項目を表示するときのハマりどころ
yumechi
0
110
AI 時代だからこそ抑えたい「価値のある」PHP ユニットテストを書く技術 #phpconfuk / phpcon-fukuoka-2025
shogogg
1
540
GraalVM Native Image トラブルシューティング機能の最新状況(2025年版)
ntt_dsol_java
0
150
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
118
20k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
A Modern Web Designer's Workflow
chriscoyier
697
190k
BBQ
matthewcrist
89
9.9k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Music & Morning Musume
bryan
46
6.9k
Bash Introduction
62gerente
615
210k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
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