I need to put a ImageView exactly over a VideoView.
When I use this code in a RelativLayout
<VideoView
android:id="@+id/videoView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true" />
the VideoView is shown on the top, the ImageView is centered vertically. What can be done to also center the ImageView, that both Views are at the same position and have the same size, when a video and a picture with the same resolution are displayed?
I just replaced my RelativLayout with an FrameLayout and everything did well.
Place first videoview then imageview in framelayout, if you are still facing problem there might be..
videoView.setZOrderOnTop(true) set by you, so make it false or remove it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With