Basically, what I want to do in my application is a video.
The best tool to achieve this, apparently, is VideoView.
So, I used this code:
<VideoView android:id="@+id/videoview" android:layout_width="50dip" android:layout_height="50dip"></VideoView>
and in my activity:
VideoView videoHolder = (VideoView)findViewById(R.id.videoview); videoHolder.setMediaController(new MediaController(this)); videoHolder.setVideoURI(Uri.parse("android.resource://com.blabla.blabla/" + R.raw.blabla)); videoHolder.requestFocus(); videoHolder.start();
and that does the trick.
Unfortunately, I was expecting a preview (thumbnail) of the video in my default layout
So, I deleted videoHolder.start () ;, but I can only get a black screen. The video starts when you click on the invisible zone ...
First question
Is it possible to display a preview of a video in VideoView before launching it?
Second question
I liked displaying the video on Fullscreen by double-clicking on the web view, how can I achieve this?
Thanks a lot for any help / link / suggestion
source share