I have an app using RecyclerView
, and on the tablet I get a light blue background showing. Particularly on Jelly Bean devices and in the emulator. I've tried to remove it by marking my RecyclerView
as android:focusable="false"
I know it's the focus indicator since on the emulator if I hit the tab key it goes away and highlights a button on the UI. It doesn't show up on the phones I've used.
So why is it being rendered on a touch device? And how do I get rid of it?
That's the style of your recyclerView item. Use selectors
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@color/pressedStateColor" />
<item android:state_focused="true" android:drawable="@color/focusedStateColor" />
<item android:drawable="@color/normalStateColor" />
</selector>
If you don't what any color to show just give the same color to the focused state or try "@android:color/transparent"
.
Then set your android:background="@drawable/your_above_xml"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With