?android:attr/selectableItemBackground などを指定することでリップルを有効にすることができます ????♀️
xml
1<?xml version="1.0" encoding="utf-8"?>
2<layout xmlns:android="http://schemas.android.com/apk/res/android">
3 <LinearLayout
4 android:layout_width="match_parent"
5 android:layout_height="match_parent"
6 android:foreground="?android:attr/selectableItemBackground"
7 android:orientation="vertical">
8
9 </LinearLayout>
10</layout>
Kotlin
1class SampleFragment : Fragment() {
2 override fun onCreateView(
3 inflater: LayoutInflater,
4 container: ViewGroup?,
5 savedInstanceState: Bundle?
6 ): View {
7 super.onCreateView(inflater, container, savedInstanceState)
8
9 val binding: SampleFragmentBinding =
10 DataBindingUtil.inflate(inflater, R.layout.sample_fragment, container, false)
11
12 binding.root.setOnClickListener {
13
14 }
15
16 return binding.root
17 }
18}
また Material Design の色やフォントに関しては公式のガイドラインが参考になると思います ????
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。