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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Takahiro Shimokawa
March 16, 2016
Programming
770
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
490
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
関数型プログラミングのメリットって何だろう?
wanko_it
0
180
5分で問診!Composer セキュリティ健康診断
codmoninc
0
330
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
140
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
580
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
860
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
520
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
9.1k
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
140
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
210
フィードバックで育てるAI開発
kotaminato
1
120
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
3
1.5k
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Evolving SEO for Evolving Search Engines
ryanjones
0
240
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Docker and Python
trallard
47
4k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
260
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
460
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
220
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
180
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
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