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
ripple-implement
Search
yiwaisako
August 23, 2018
Technology
2
480
ripple-implement
AndroidのRippleについてpotato tips#54で話しました。
yiwaisako
August 23, 2018
Tweet
Share
Other Decks in Technology
See All in Technology
A2Aのクライアントを自作する
rynsuke
1
170
Microsoft Build 2025 技術/製品動向 for Microsoft Startup Tech Community
torumakabe
2
250
PostgreSQL 18 cancel request key長の変更とRailsへの関連
yahonda
0
120
OpenHands🤲にContributeしてみた
kotauchisunsun
1
390
Definition of Done
kawaguti
PRO
6
470
Node-RED × MCP 勉強会 vol.1
1ftseabass
PRO
0
140
Fabric + Databricks 2025.6 の最新情報ピックアップ
ryomaru0825
1
120
Wasm元年
askua
0
130
Agentic DevOps時代の生存戦略
kkamegawa
1
1.3k
AWS Summit Japan 2025 Community Stage - App workflow automation by AWS Step Functions
matsuihidetoshi
1
220
Model Mondays S2E02: Model Context Protocol
nitya
0
210
ハノーバーメッセ2025座談会.pdf
iotcomjpadmin
0
160
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
670
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Making Projects Easy
brettharned
116
6.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Site-Speed That Sticks
csswizardry
10
660
Producing Creativity
orderedlist
PRO
346
40k
Agile that works and the tools we love
rasmusluckow
329
21k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
A designer walks into a library…
pauljervisheath
206
24k
Balancing Empowerment & Direction
lara
1
360
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Transcript
3JQQMF࣮ʹ͍ͭͯ 1PUBUPUJQT BOEGBDUPSZגࣜձࣾॕഭળ
ࣗݾհ w ॕഭળʢ:PTIJUP*XBJTBLP !ZTU@J w "OESPJEΤϯδχΞ w BOEGBDUPSZגࣜձࣾ w ϚϯΨ1BSL
w "OESPJEΤϯδχΞืूதͰ͢ʂ w .BUFSJBM%FTJHO͖Ͱ͢ʂ
͍ͨ͜͠ͱ w 3JQQMFͷ࣮ w 3JQQMFΛίʔυͰ࣮͢Δ
ಈ࡞ڥ w DPNQJMF4EL7FSTJPO w NJO4EL7FSTJPO w UBSHFU4EL7FSTJPO w TVQQPSU-JCSBSZ7FSTJPO
3JQQMF
.BUFSJBM%FTJHOͷλον ϑΟʔυόοΫ
3JQQMFαϯϓϧ
*NQMFNFOU
Γ͍ͨ͜ͱ w -PMJQPQҎ্3JQQMFΛදࣔɺ,JULBUผͷλονϑΟʔ υόοΫΛදࣔɻ w 7JFX(SPVQͷ֊ΛͰ͖Δ͚ͩઙ͘͢Δ
αϯϓϧσβΠϯ wᶃɿը૾ɻશମʹ3JQQMFΛදࣔ͢Δ wᶄɿλΠτϧͱઆ໌จɻશମʹ3JQQMFΛදࣔ͢Δ wᶅɺᶆɿSFBEϘλϯɺUSJBMϘλϯɻϘλϯͷΈ 3JQQMFΛදࣔ͢Δ ᶃ ᶅ ᶄ ᶆ
ϨΠΞτ <android.support.v7.widget.CardView android:foreground="@drawable/foreground_ripple"> <RelativeLayout> <ImageView/> <RelativeLayout> <RelativeLayout> <TextView android:id="@+id/title"/> <TextView
android:id=“@+id/update_info"/> </RelativeLayout> <LinearLayout> <android.support.v7.widget.CardView android:id="@+id/read_button_wrapper" android:foreground="@drawable/foreground_ripple"> <TextView android:id="@+id/read_button_text"/> </android.support.v7.widget.CardView> <android.support.v7.widget.CardView android:id="@+id/trial_button_wrapper" android:foreground="@drawable/foreground_ripple"> <TextView android:id="@+id/trial_button_text"> </android.support.v7.widget.CardView> </LinearLayout> </RelativeLayout> </RelativeLayout> </android.support.v7.widget.CardView>
ϨΠΞτ 1. <android.support.v7.widget.CardView 2. android:foreground=“@drawable/foreground_ripple” 3. <!— android:foreground=“?android:attr/selectableItemBackground”> —> 4.
<RelativeLayout> 5. <ImageView/> 6. <RelativeLayout> 7. <RelativeLayout> 8. <TextView 9. android:id="@+id/title"/> 10. <TextView 11. android:id=“@+id/update_info"/> 12. </RelativeLayout> 13. <LinearLayout> 14. <android.support.v7.widget.CardView 15. android:id="@+id/read_button_wrapper" 16. android:foreground="@drawable/foreground_ripple"> 17. <TextView 18. android:id="@+id/read_button_text"/> 19. </android.support.v7.widget.CardView> 20. <android.support.v7.widget.CardView 21. android:id="@+id/trial_button_wrapper" 22. android:foreground="@drawable/foreground_ripple"> 23. <TextView 24. android:id="@+id/trial_button_text"> 25. </android.support.v7.widget.CardView> 26. </LinearLayout> 27. </RelativeLayout> 28. </RelativeLayout> 29.</android.support.v7.widget.CardView> ίʔυଆͰTFU0O$MJDL-JTUFOFS ඞཁ 3FMBUJWF-BZPVUͷGPSFHSPVOEʹ3JQQMFΛηοτͯ͠-PMJQPQ ͩͱಈ͔ͳ͍
3JQQMF9.- 1. <?xml version="1.0" encoding="utf-8"?> 2. <ripple xmlns:android="http://schemas.android.com/apk/res/android" 3. android:color="@color/red">
4. <item 5. android:id="@android:id/mask" 6. android:drawable="@android:color/white"/> 7. </ripple> ࢠཁૉͷJUNͷNBTLʹESBXBCMFΛࢦఆ͠ͳ͍ͱɺࢦΛ ͨ͠λΠϛϯάͰ3JQQMF͕දࣔ͞Ε·ͤΜͰͨ͠ɻ
None
3JQQMFΛίʔυͰ࣮͢Δ 1.holder.root.setOnClickListener { _ -> } 3. if (Build.VERSION.SDK_INT >=
Build.VERSION_CODES.LOLLIPOP) { 4. val rippleColors = intArrayOf(R.color.colorAccent, R.color.colorPrimary, R.color.colorPrimaryDark, 5. R.color.medium_turquoise_cc, R.color.eclipse, R.color.malibu 6. ) 8. val i = Random().nextInt(rippleColors.size) 9. val mask = ContextCompat.getDrawable(context, R.drawable.mask) 10. val color = ContextCompat.getColor(context, rippleColors[i]) 11. holder.root.foreground = RippleDrawable(ColorStateList.valueOf(color), null, mask).mutate() 12.} 14. $PMPSͱ%SBXBCMFΛ࡞ ̎NBTL༻ͷ%SBXBCMFΛ࡞ 3JQQMF%SBXBCMFΛ7JFXͷGPSFHSPVOEʹηοτ TFU0ODMJDL-JTUFOFS Λઃఆ ͢Δ͔ɺ9.-ʹzDMJDLBCMF USVFzͷઃఆ͕ඞཁͰ͢
None
·ͱΊ w ,JULBUΛಈ࡞ର֎ͱ͢ΔΞϓϦ͕૿͖͑ͯ·͕ͨ͠ɺ -PMJQPQ͠Β͘ରԠ͕ଓ͖ͦ͏Ͱ͢ɻ w -PMJQPQͰ3JQQMFΛදࣔ͢Δʹɺ$BSE7JFX 'SBNF-BZPVUΛར༻ͯ͠ϨΠΞτΛߟ͑Δඞཁ͕͋Γ ͦ͏Ͱ͢ɻ w 1MBJEͰ3FMBUJWF-BZPVUͷTFU'PSFHSPVOEΛόοΫϙʔ
τ͍ͯ͠ΔΑ͏Ͱ͢ɻ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·͠ ͨʂ