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.1k
R8/ProGuard 徹底比較
satoshun
8
4.4k
Android: Daggear2でDI
satoshun
0
200
Other Decks in Programming
See All in Programming
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.9k
SODA - FACT BOOK(EN)
sodainc
1
230
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
170
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
140
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
110
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.9k
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
350
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.5k
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
130
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
300
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
230
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
400
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
660
Building Applications with DynamoDB
mza
96
7.3k
It's Worth the Effort
3n
188
29k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
400
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
430
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Darren the Foodie - Storyboard
khoart
PRO
5
4.1k
Context Engineering - Making Every Token Count
addyosmani
9
1.3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k