Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Android: Introduction Android Support Annotations
Search
Sato Shun
August 11, 2015
Programming
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Android: Introduction Android Support Annotations
Sato Shun
August 11, 2015
Transcript
12 slides
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
More Decks by Sato Shun
See All by Sato Shun
Kotlin Nativeにおけるfrozen状態と並行処理について
satoshun
0
1.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.7k
Kotlin Fest 2019: Kotlin型実践入門
satoshun
9
7.2k
R8/ProGuard 徹底比較
satoshun
8
4.4k
Android: Daggear2でDI
satoshun
0
200
Other Decks in Programming
See All in Programming
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
440
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
320
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
650
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
350
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
270
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
510
将来の標準フォーマッター?ktfmtを深堀る
t45k
1
250
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
240
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
1.3k
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
Agentic AI with the Power of Jakarta EE
ivargrimstad
0
240
R言語プログラミング
profjoesuzuki
0
130
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
570
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.6k
Fireside Chat
paigeccino
43
4.1k
A designer walks into a library…
pauljervisheath
211
25k
Evolving SEO for Evolving Search Engines
ryanjones
0
380
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
4
1.3k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.5k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Six Lessons from altMBA
skipperchong
29
4.6k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
690