Android Youtube Player in Fragment and Activity causes black screen

拥有回忆 提交于 2019-12-07 12:29:13

问题


I need to load a video in youtube player in an fragment (Consider it as Fragment A) as a header to a gridview in a fragment.Video is loading fine without any issue. But if i click on a grid item and loads seperate activity (Consider it as Activity B) in which there also, I am having youtube video player. It is playing fine in that activity. But when i come back to fragment from the activity B , now youtube player is not playing. Simply black screen is displaying.

FYI, I am having Fragment A in slidingMenu activity and activity B as activity.

For Fragment i am using youtubesupportfragment and in activity i am using YoutubeBaseActivity

来源:https://stackoverflow.com/questions/37990973/android-youtube-player-in-fragment-and-activity-causes-black-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!