VideoView black flash before and after playing

前端 未结 14 2178
谎友^
谎友^ 2020-12-09 04:04

I have a VideoView which I want to use to play a movieclip. I use it like this to play it and it works.

VideoView vv = new VideoView(this);
vv.setVideoURI(Ur         


        
14条回答
  •  时光说笑
    2020-12-09 04:30

    Where are you changing the contentView (in which method did you write the four lines of code above)?

    You should only set the contentView in the onCreate() method of an Activity. If you are doing it somewhere else (for exemple in a button’s callback), you should start a new activity instead.

提交回复
热议问题