In the case of a well-voted solution sent by @Bikesh M Annur ( here ) does not suit you, try using:
<TextView ... android:background="?android:attr/selectableItemBackgroundBorderless" android:clickable="true" /> <ImageView ... android:background="?android:attr/selectableItemBackgroundBorderless" android:clickable="true" />
Also, when using android:clickable="true" add android:focusable="true" because:
"A widget declared clickable but not declared for focus is not accessible from the keyboard."
Filipe de Lima Brito Dec 07 '17 at 19:20 2017-12-07 19:20
source share