Android Thread Controlling Multiple Texture Views Causes Strange Flickering
I am trying to use a single thread to render three separate TextureView's off the UI thread using canvas lock/unlock. The problem observed is the consistent flickering of each of t
Solution 1:
I was able to find a workaround for this. (i dont observe this on android 5.0 and above).
Add a psuedo transparent view like below
<View
android:id="@+id/flicker_hack_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:alpha="0.01"
android:background="@color/black_12" />
which covers the entire activity wherever there is a textureView. the alpha should be set to 0.01 or a smaller value to make it seem invisible.
This workaround was based on my observation that when the two textureviews rendering videos overlap the flicker is not observed.
Post a Comment for "Android Thread Controlling Multiple Texture Views Causes Strange Flickering"