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
94
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
800
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.3k
Kotlin Fest 2019: Kotlin型実践入門
satoshun
9
6.1k
R8/ProGuard 徹底比較
satoshun
8
3.8k
Android: Daggear2でDI
satoshun
0
97
Other Decks in Programming
See All in Programming
Rust.Nagoya #1
codemountains
0
170
I/O Extended Android in Korea 2024 ~ Whats new in Android development tools
pluu
0
250
みんなのオブザーバビリティプラットフォームを作ってるんだがパフォーマンスがやばい #mackerelio #srenext
ne_sachirou
0
380
しくじり先生 Image Matching Challenge 2024 編
goosehaaan
0
810
社内 LT 会を発足し、アウトプット文化を醸成させるために考えたこと・やったこと / Starting internal LT meetings and fostering an output culture
mackey0225
3
120
Trial
cairolibrary720
1
130
AWSでゲームサーバーを運用! Amazon GameLiftのお話
iriikeita
0
200
コード生成を伴うLLMエージェント - 2024.07.18 Tokyo AI
smiyawaki0820
11
4.1k
なぜ宣言的 UI は壊れにくいのか / Why declarative UI is less fragile
uenitty
29
13k
Rubyのパフォーマンスプロファイリングの改善 / Enhancing performance profiling for Ruby
osyoyu
1
410
CSC307 Lecture 09
javiergs
PRO
1
500
APIのない大学ログインWebサービスをWKWebViewとJavaScriptでアプリ化した話
akidon0000
1
330
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
219
8.8k
The Invisible Customer
myddelton
117
13k
How STYLIGHT went responsive
nonsquared
93
5k
Ruby is Unlike a Banana
tanoku
96
10k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
26
1.6k
The Power of CSS Pseudo Elements
geoffreycrofte
64
5.2k
Why Our Code Smells
bkeepers
PRO
332
56k
Thoughts on Productivity
jonyablonski
64
4.1k
Navigating Team Friction
lara
181
13k
Designing with Data
zakiwarfel
96
5k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
A Modern Web Designer's Workflow
chriscoyier
689
190k
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