android - VideoView not visible if height is WRAP_CONTENT -


I videoview your application, it is a small videoview, not fullscreen.

This I found videoView see a non-:

  mVideo.setLayoutParams (New LinearLayout.LayoutParams (200, LinearLayout.LayoutParams.WRAP_CONTENT)); mVideo.setOnPreparedListener (New OnPreparedListener () {@Override public void onPrepared (MediaPlayer mp) {mVideo.setLayoutParams (New LinearLayout.LayoutParams (getIntWidth (), LinearLayout.LayoutParams.WRAP_CONTENT));}});  

And I got videoView a fully visible:

  mVideo.setLayoutParams (New LinearLayout.LayoutParams (200, 1)); mVideo.setOnPreparedListener (New OnPreparedListener () {@Override public void onPrepared (MediaPlayer mp) {mVideo.setLayoutParams (New LinearLayout.LayoutParams (getIntWidth (), LinearLayout.LayoutParams.WRAP_CONTENT));}});  

Why do I have to put 1 pixel of Ajie in the initial height size of the videoview?

Thanks

If you are using it for video, then As long as you do not start playing any video, wrap_content does not have any content to wrap.

Since knowing the size of the content is not visible now, content yet pair is not went, so it either can not wrap

1 attract px height Let's point out.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -