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
Support Library v23.2 overview
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Takahiro Shimokawa
March 16, 2016
Programming
760
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Support Library v23.2 overview
shibuya.apk #6で発表した内容です
Takahiro Shimokawa
March 16, 2016
More Decks by Takahiro Shimokawa
See All by Takahiro Shimokawa
PlayStoreでの新しいユーザー訴求 -LiveOpsの活用とその成果-
androhi
0
2.9k
ConcatAdapterを深掘る
androhi
1
480
Android Studio 4.1推しポイント!
androhi
0
1.5k
一人開発でつまづいたときの処方箋
androhi
0
410
Androidの物理ベースアニメーション
androhi
1
680
ConstraintLayout再入門
androhi
2
3.6k
Firebase Analytics 使用感
androhi
0
930
Support Library 総復習
androhi
2
2.6k
(続)エンジニアのためのSketch3入門
androhi
1
3k
Other Decks in Programming
See All in Programming
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
6.6k
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
100
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
110
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
200
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
160
さぁV100、メモリをお食べ・・・
nilpe
0
140
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
240
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
170
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
330
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
350
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
250
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Building an army of robots
kneath
306
46k
Designing for Performance
lara
611
70k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Practical Orchestrator
shlominoach
191
11k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
340
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Transcript
Support Library v23.2 overview @androhi 1
About me 4 Zaim Inc. 4 GitHub / Twitter /
Qiita 4 @androhi 4 DroidKaigi 2016 staff & speaker @androhi 2
Agenda 4 v23.2ͷτϐοΫ 4 RecyclerViewͷࣗಈαΠζௐػೳ @androhi 3
v23.2ͷτϐοΫ 1. VectorDrawableͷαϙʔτ 4 Ξχϝʔγϣϯ͖Ұ෦੍ݶ͋Γ 2. AppCompatͷDayNightςʔϚ 3. BottomSheetͷαϙʔτ 4.
ΧελϜλϒʹϘτϜόʔͷՃ 5. AndroidTVͷLeanbackڧԽ @androhi 4
VectorDrawable ͷαϙʔτ 4 VectorDrawableରԠ·ͱΊ @konifar 4 AppCompat v23.2 — Age of the
vectors @androhi 5
DayNight ςʔϚͷՃ <style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar"> ... </style> // ΞϓϦશମʹઃఆ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
// ActivityDialog୯ҐͰઃఆ AppCompatDelegate delegate = getDelegate(); delegate.setLocalNightMode(AppCompatDelegate.MODE_NIGHT_NO); @androhi 6
BottomSheet ͷαϙʔτ 4 αϙʔτϥΠϒϥϦ @yuichi_araki 4 BottomSheetBehaviorΛ͏ @napplecomputer @androhi 7
ΧελϜλϒͷϘ τϜόʔ ※ chrome v49 Ҏ্ @androhi 8
ΧελϜλϒͷϘτϜόʔ // VectorDrawableͰେৎʂ Bitmap icon1 = BitmapFactory.decodeResource(getResources(), R.drawable.ic_room_24dp); Bitmap icon2
= BitmapFactory.decodeResource(getResources(), R.drawable.ic_favorite_24dp); CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder() .setToolbarColor(getResources().getColor(R.color.colorPrimary)) .setSecondaryToolbarColor(getResources().getColor(R.color.colorPrimary)) // ՃͰ͖Δͷ4ݸ·ͰɻͦΕҎ্IllegalStateException .addToolbarItem(1, icon1, "description1", pendingIntent) .addToolbarItem(2, icon2, "description2", pendingIntent) .build(); customTabsIntent.launchUrl(this, Uri.parse("http://zaim.net")); @androhi 9
Leanback ڧԽ 4 GuidedStepFragment ͷେ෯ͳվળ 4 ࠓճࢼͤ·ͤΜͰͨ͠... @androhi 10
RecyclerViewͷ ࣗಈαΠζௐػೳ @androhi 11
WRAP_CONTENT ͷ༗ޮԽ RecyclerView ΛίϯςϯπͷαΠζʹԠͯ͡α ΠζมߋͰ͖ΔΑ͏ʹͳΓ·͢ɻͭ·ΓɺҎલ Ͱ͖ͳ͔ͬͨ RecyclerView ͷੇ๏ʹ WRAP_CONTENT Λ༻͢Δ͜ͱ͕Ͱ͖ΔΑ͏
ʹͳ͍ͬͯ·͢ɻ — Google Developers Japan @androhi 12
activity.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.RecyclerView android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#ff0000"/> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/recycler_view" android:background="#00ff00" android:text="Test"/> </RelativeLayout> @androhi 13
list_item.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/list_text"
android:layout_width="match_parent" android:layout_height="wrap_content"/> </RelativeLayout> @androhi 14
@androhi 15
@androhi 16
͜͠Μͳ list_item.xml ͩͬͨ Β... <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"> <TextView android:id="@+id/list_text" android:layout_width="match_parent" android:layout_height="wrap_content"/> </RelativeLayout> @androhi 17
@androhi 18
v23.1 -> v23.2 ͷΞοϓσʔτ RecyclerView ͷ༻Օॴཁҙ @androhi 19
LayoutManager ͷมߋ ϏϧτΠϯͷ LayoutManager ΛܧঝͤͣɺΧε λϜͷ LayoutManager Λ༻͍ͯ͠Δ߹ɺ͜ ΕΦϓτΠϯ API
ʹͳΓ·͢ɻ setAutoMeasureEnabled(true) Λݺͼग़͠ɺ ϝιουͷ Javadoc ʹৄ͘͠هࡌ͞Ε͍ͯΔͱ ͓Γɺࡉ͔ͳมߋΛՃ͑Δඞཁ͕͋Γ·͢ɻ — Google Developers Japan @androhi 20
LayoutManager#setAutoMeasureEn abled(boolean) ϨΠΞτͷଌఆ( onMeasure )Λɺ RecyclerView ͕ߦ͏( =true )ͷ͔ LayoutManager
͕ߦ͏( =false )ͷ͔Λఆٛ͢ Δϝιουɻ -> RecyclerView ͕ଌఆ͢Δ߹ɺࢠͷཁૉ͔ ΒαΠζΛࣗಈܭࢉ͢Δɻ @androhi 21
v23.1 ͷ LinearLayoutManager // Constructor public LinearLayoutManager(Context context, int orientation,
boolean reverseLayout) { setOrientation(orientation); setReverseLayout(reverseLayout); } @androhi 22
v23.2 ͷ LinearLayoutManager public LinearLayoutManager(Context context, int orientation, boolean reverseLayout)
{ setOrientation(orientation); setReverseLayout(reverseLayout); setAutoMeasureEnabled(true); } @androhi 23
LayoutManager ΛΧελϜͯ͠Δ ͳΒ onMeasure Λ override ͍ͯ͠Δ߹ɺΧε λϜ LayoutMnagerͷதͰ setAutoMeasureEnabled(false)
ΛݺͿɻ @androhi 24
·ͱΊ 4 VectorDrawable αϙʔτ࠷ߴ 4 RecyclerView ཁҙ @androhi 25