0

Current my textview already has a background:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

    <solid android:color="@color/frageventButtonColor" />
    <corners android:radius="5dp" />
</shape>

How can I also add the

android:background="?attr/selectableItemBackground"

to it as well, making it clickable

DIRTY DAVE
  • 1,908
  • 2
  • 13
  • 46

2 Answers2

1
android:background="?actionBarItemBackground"

gives the circular ripple on api 23+ and defaults to

android:background="?attr/selectableItemBackground"

the square ripple

if not api 23

DIRTY DAVE
  • 1,908
  • 2
  • 13
  • 46
0

If you have minSdk 23, use android:foreground="?attr/selectableItemBackground"

If not, see this answer

solidogen
  • 482
  • 4
  • 10