textureview onSurfaceTextureAvailable never called inside relativelayout inside fragment

后端 未结 7 1416
走了就别回头了
走了就别回头了 2020-12-10 10:52

onSurfaceTextureAvailable in VideoView is never called...
I have this view that is holding the textureview.

public class MyMediaPlayer extends RelativeLa         


        
7条回答
  •  囚心锁ツ
    2020-12-10 11:16

    As for me ,the key to solve the problem is that add android:hardwareAccelerated="true" for the activity in the AndroidManifest.xml .

    You can use TextureView in a Scrolling-Container(Such as ListView,ScrollView,ViewPager etc) only if the activity for the TextureView with hardwareAccelerated property on.

    The last few words in this blog mentioned that

    Hope it works for you.

提交回复
热议问题