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
880
DroidKaigi 2020: System UIをコントロールして、 画面を最大限に生かしたアプリを構築する / Build apps that make the best uses of device screens by controlling System UI
satoshun
4
1.7k
タップルでたっぷりDaggerを使って マルチモジュール構築している話 :)
satoshun
2
2.4k
Kotlin Fest 2019: Kotlin型実践入門
satoshun
9
6.3k
R8/ProGuard 徹底比較
satoshun
8
4k
Android: Daggear2でDI
satoshun
0
110
Other Decks in Programming
See All in Programming
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
320
GoとPHPのインターフェイスの違い
shimabox
2
190
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
120
Amazon Bedrock Multi Agentsを試してきた
tm2
1
290
CI改善もDatadogとともに
taumu
0
120
2024年のWebフロントエンドのふりかえりと2025年
sakito
2
250
Honoとフロントエンドの 型安全性について
yodaka
7
1.2k
Open source software: how to live long and go far
gaelvaroquaux
0
630
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
110
動作確認やテストで漏れがちな観点3選
starfish719
6
1k
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
120
時計仕掛けのCompose
mkeeda
1
300
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
521
39k
Why Our Code Smells
bkeepers
PRO
336
57k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
Designing Experiences People Love
moore
140
23k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
174
51k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
For a Future-Friendly Web
brad_frost
176
9.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