How to create ripple effect in simple layout
问题 How can I have a ripple effect in a simple linear/relative layout when touching the layout? I've tried setting the background of a layout to something like: <?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight" > <item android:drawable="@android:color/white"/> </ripple> However I'm only seeing a plain white background and no ripple effect when touching the layout. What am I doing wrong? Edit: