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
SAE J1939シミュレーション環境構築
daikiokazaki
1
200
LLMでAI-OCR、実際どうなの? / llm_ai_ocr_layerx_bet_ai_day_lt
sbrf248
0
400
Datasets for Critical Operations by Dataform
kimujun
0
140
GMOペパボのデータ基盤とデータ活用の現在地 / Current State of GMO Pepabo's Data Infrastructure and Data Utilization
zaimy
3
160
【CEDEC2025】現場を理解して実現!ゲーム開発を効率化するWebサービスの開発と、利用促進のための継続的な改善
cygames
PRO
0
620
メモ整理が苦手な者による頑張らないObsidian活用術
optim
1
170
Vision Language Modelと自動運転AIの最前線_20250730
yuyamaguchi
2
990
生成AI時代におけるAI・機械学習技術を用いたプロダクト開発の深化と進化 #BetAIDay
layerx
PRO
1
650
経理出身PdMがAIプロダクト開発を_ハンズオンで学んだ話.pdf
shunsukenarita
1
280
【CEDEC2025】『ウマ娘 プリティーダービー』における映像制作のさらなる高品質化へ!~ 豊富な素材出力と制作フローの改善を実現するツールについて~
cygames
PRO
0
140
20250728 MCP, A2A and Multi-Agents in the future
yoshidashingo
1
180
alecthomas/kong はいいぞ
fujiwara3
6
1.3k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
524
40k
Mobile First: as difficult as doing things right
swwweet
223
9.8k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Speed Design
sergeychernyshev
32
1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
A Tale of Four Properties
chriscoyier
160
23k
What's in a price? How to price your products and services
michaelherold
246
12k
GitHub's CSS Performance
jonrohan
1031
460k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Git: the NoSQL Database
bkeepers
PRO
431
65k
How STYLIGHT went responsive
nonsquared
100
5.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
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ΛόοΫϙʔ
τ͍ͯ͠ΔΑ͏Ͱ͢ɻ
͝੩ௌ͋Γ͕ͱ͏͍͟͝·͠ ͨʂ