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
Practical Tips and Tricks for Working with Compose Multiplatform Previews (mDevCamp 2025)
stewemetal
0
130
Cloudflare Realtime と Workers でつくるサーバーレス WebRTC
nekoya3
0
420
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
2
520
GoのGenericsによるslice操作との付き合い方
syumai
2
660
iOSアプリ開発で 関数型プログラミングを実現する The Composable Architectureの紹介
yimajo
2
210
業務自動化をJavaとSeleniumとAWS Lambdaで実現した方法
greenflagproject
1
120
WindowInsetsだってテストしたい
ryunen344
1
190
複数アプリケーションを育てていくための共通化戦略
irof
10
4k
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
250
A comprehensive view of refactoring
marabesi
0
840
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
810
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
370
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
660
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Fireside Chat
paigeccino
37
3.5k
The World Runs on Bad Software
bkeepers
PRO
68
11k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
790
How to Ace a Technical Interview
jacobian
277
23k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
Raft: Consensus for Rubyists
vanstee
140
7k
Done Done
chrislema
184
16k
Faster Mobile Websites
deanohume
307
31k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.9k
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