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
900
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.4k
R8/ProGuard 徹底比較
satoshun
8
4k
Android: Daggear2でDI
satoshun
0
120
Other Decks in Programming
See All in Programming
Serving TUIs over SSH with Go
caarlos0
0
650
ASP.NETアプリケーションのモダナイゼーションについて
tomokusaba
0
260
ニーリーQAのこれまでとこれから
nealle
2
780
生成AI時代のフルスタック開発
kenn
3
400
Vibe Coding の話をしよう
schroneko
14
3.8k
最速Green Tea 🍵 Garbage Collector
kuro_kurorrr
1
110
SwiftDataのカスタムデータストアを試してみた
1mash0
0
150
読書シェア会 vol.4 『ダイナミックリチーミング 第2版』
kotaro666
0
110
note の Elasticsearch 更新系を支える技術
tchov
9
3.6k
ぽちぽち選択するだけでOSSを読めるVSCode拡張機能
ymbigo
14
6.2k
Golangci-lint v2爆誕: 君たちはどうすべきか
logica0419
1
250
カウシェで Four Keys の改善を試みた理由
ike002jp
1
130
Featured
See All Featured
Designing for humans not robots
tammielis
253
25k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
34
2.2k
Build your cross-platform service in a week with App Engine
jlugia
230
18k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
23
2.7k
Bash Introduction
62gerente
613
210k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
A Tale of Four Properties
chriscoyier
159
23k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
Making the Leap to Tech Lead
cromwellryan
133
9.3k
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