In my app I have a custom view contained in a scrollview.
The app can be controlled via a bluetooth pedal (which sends keyboard messages).
On my old tablet – Android 4.4 – everything works fine.
Now that I have got a new tablet – Android 10 – when the pedal is fired, the zone covered by the scrollview and custom view has the background coloured blue !
This did not happen before.
The scrollview is declared like this :
<ScrollView android:id="@+id/svScroller" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:focusable="false" android:focusableInTouchMode="false" android:background="@color/white" >
The custom view is declared like this :
<MyView android:id="@+id/myview" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:background="@android:color/transparent" />
I first of all thought that there was a statelistdrawable by default on the scrollview, which is why I put a colour directly into the background.
I am at a loss to know where this new behaviour has come from and, therefore, how to correctly handle it.
Can anyone help with this ?
Source: Android Questions