ViewPagerAdapter: YouTube video playback stopped due to unauthorized overlay on top of player

后端 未结 1 641

Asking this question because I did not find solution/suggestions after searching for hours. All answered solutions are with Fragment. What I am looking for ViewPagerAdapter and

相关标签:
1条回答
  • 2021-02-10 14:25

    fix this by removing the padding in the YouTubePlayerView in the layout. So your layout looks like this:

    <com.google.android.youtube.player.YouTubePlayerView
        android:id="@+id/video_player"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#000" />
    

    why you are using instantiateItem instead of getItem in adapter?

    0 讨论(0)
提交回复
热议问题