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
150
0
Share
Android: Introduction Android Support Annotations
Sato Shun
August 11, 2015
More Decks by Sato Shun
See All by Sato Shun
Kotlin Nativeにおけるfrozen状態と並行処理について
satoshun
0
1k
DroidKaigi 2020: System UIをコントロールして、 画面を最大限に生かしたアプリを構築する / Build apps that make the best uses of device screens by controlling System UI
satoshun
4
2k
タップルでたっぷりDaggerを使って マルチモジュール構築している話 :)
satoshun
2
2.6k
Kotlin Fest 2019: Kotlin型実践入門
satoshun
9
7k
R8/ProGuard 徹底比較
satoshun
8
4.3k
Android: Daggear2でDI
satoshun
0
180
Other Decks in Programming
See All in Programming
RTSPクライアントを自作してみた話
simotin13
0
220
OSもどきOS
arkw
0
180
Sans tests, vos agents ne sont pas fiables
nabondance
0
160
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
150
自動レビューエンジンの実装と運用 ~レビューのない世界へ~
kurukuru1999
2
270
AI 時代のソフトウェア設計の学び方
masuda220
PRO
28
10k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
2
400
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
120
Modding RubyKaigi for Myself
yui_knk
0
480
New "Type" system on PicoRuby
pocke
1
210
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
150
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
7
2.6k
Featured
See All Featured
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
410
We Are The Robots
honzajavorek
0
230
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
450
Context Engineering - Making Every Token Count
addyosmani
9
910
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
240
AI: The stuff that nobody shows you
jnunemaker
PRO
7
660
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
190
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
380
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
190
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