I have a SurfaceView in a ScrollView . Whenever I try to scroll, SurfaceView always lags slightly behind the black seams, where it does not cover the space in which it should be.
My code for SurfaceView :
<SurfaceView android:layout_width="match_parent" android:layout_height="200dp" android:id="@+id/fragment_stats_hourly_surface_view" android:layout_below="@+id/fragment_stats_hourly_view" android:layout_marginLeft="16dp" android:layout_marginRight="16dp" android:background="@drawable/outline" />
How can I set SurfaceView to keep up with scrolling to stop black seams from appearing?
I should also note that I started a new project with empty activity with ScollView and SurfaceView inside it with the same results.
source share