I am trying to set the onClick()
highlight for each row in my TableLayout
.
I have a drawable resource file:
<item
android:drawable="?android:attr/selectableItemBackground"
android:state_focused="true"
android:state_pressed="true" />
<!-- Bottom border -->
<item android:top="65dp" android:left="15dp">
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<size android:height="0.25dp"/>
<solid android:color="@color/dark_blue"/>
</shape>
</item>
I have tested this on a Samsung Galaxy S5 device which works. However, when I test on a ZTE Compel Device, which has Android 4.4.2 installed on it -- it does not work.
My application is targeting API 15 and up.
Any ideas why this: ?android:attr/selectableItemBackground
doesn't work on Android 4.4.2 device?
Error in logs:
Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #7: tag requires a 'drawable' attribute or child tag defining a drawable
I have ?attr/selectableItemBackground
and it doesn't resolve the issue.
I have done a ton of research.
Any other suggestions from your side?