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
  • 2,523
  • 2
  • 20
  • 83

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
  • 2,523
  • 2
  • 20
  • 83
0

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

If not, see this answer

solidogen
  • 591
  • 5
  • 12