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
450
ripple-implement
AndroidのRippleについてpotato tips#54で話しました。
yiwaisako
August 23, 2018
Tweet
Share
Other Decks in Technology
See All in Technology
AWS パートナー企業でテクニカルサポートに従事して2年経ったので思うところをまとめてみた
kazzpapa3
3
1.3k
Postman v10リリース後を振り返る
nagix
0
120
"好き"との生活/Regularly update profile with GitHub Actions
judeeeee
0
150
疲弊しない!AWSセキュリティ統制の考え方 #devio_osakaday1
masahirokawahara
6
5.8k
Four keys改善の取り組み事例紹介
sansantech
PRO
2
230
NgRx Signal Store
rainerhahnekamp
0
110
Microsoft Cloudで開発ライフサイクルを保護する
kkamegawa
0
140
「手動オペレーションに定評がある」と言われた私が心がけていること / phpcon_odawara2024
blue_goheimochi
1
320
A (short) History of AI
harishpillay
0
110
Autonomous Database Cloud 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
13
35k
OpenTelemetry を使ったトレースエグザンプラーの活用 / otel-trace-exemplar
k6s4i53rx
2
630
株式会社EventHub・エンジニア採用資料
eventhub
0
1.9k
Featured
See All Featured
Designing with Data
zakiwarfel
95
4.8k
The Brand Is Dead. Long Live the Brand.
mthomps
48
28k
RailsConf 2023
tenderlove
1
530
Designing Dashboards & Data Visualisations in Web Apps
destraynor
225
51k
Happy Clients
brianwarren
91
6.4k
Embracing the Ebb and Flow
colly
78
4.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
13
1.5k
The Art of Programming - Codeland 2020
erikaheidi
41
12k
Rails Girls Zürich Keynote
gr2m
91
13k
Fantastic passwords and where to find them - at NoRuKo
philnash
36
2.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
272
13k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
75
41k
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ΛόοΫϙʔ
τ͍ͯ͠ΔΑ͏Ͱ͢ɻ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·͠ ͨʂ