Posts

Showing posts with the label androidappsonchromeos

How to have a android:background color and still retain the gray focus highlight for lists in Android?

Image
Clash Royale CLAN TAG #URR8PPP How to have a android:background color and still retain the gray focus highlight for lists in Android? I'm porting my app to Chrome OS and there are a few places in the app where arrow key navigation works, but the current focused element is not highlighted in any way. I've found that whenever I set a background color for an element like <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" ... android:background="@color/white" > ... </LinearLayout> then the default highlighting of the focused element will not show. Removing this will show the default background (which is not always the same as what I want). Also, in cases where I use a selector in a ListView, the background is in front of the intended highlighting drawable (which can be seen if the color is somewhat transparent). <?xml version="1.0...