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
120
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
950
DroidKaigi 2020: System UIをコントロールして、 画面を最大限に生かしたアプリを構築する / Build apps that make the best uses of device screens by controlling System UI
satoshun
4
1.9k
タップルでたっぷりDaggerを使って マルチモジュール構築している話 :)
satoshun
2
2.5k
Kotlin Fest 2019: Kotlin型実践入門
satoshun
9
6.6k
R8/ProGuard 徹底比較
satoshun
8
4.1k
Android: Daggear2でDI
satoshun
0
130
Other Decks in Programming
See All in Programming
CSC305 Lecture 06
javiergs
PRO
0
240
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
1
630
Claude CodeによるAI駆動開発の実践 〜そこから見えてきたこれからのプログラミング〜
iriikeita
0
280
CSC509 Lecture 03
javiergs
PRO
0
340
理論と実務のギャップを超える
eycjur
0
140
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
3
900
AI Agent 時代的開發者生存指南
eddie
3
1.7k
Range on Rails ―「多重範囲型」という新たな選択肢が、複雑ロジックを劇的にシンプルにしたワケ
rizap_tech
0
6.7k
XP, Testing and ninja testing ZOZ5
m_seki
3
700
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
190
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
990
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
120
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
75
5.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
590
Raft: Consensus for Rubyists
vanstee
140
7.1k
Bash Introduction
62gerente
615
210k
4 Signs Your Business is Dying
shpigford
185
22k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Making Projects Easy
brettharned
120
6.4k
Music & Morning Musume
bryan
46
6.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.8k
How STYLIGHT went responsive
nonsquared
100
5.8k
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