I'm positioning a VideoView with AbsoluteLayout (I need to display it on several places into the screen at specific positions).
public void showVideo(RectF bounds, final String videoUrl) {
AbsoluteLayout.LayoutParams params = (AbsoluteLayout.LayoutParams) video.getLayoutParams();
params.width = (int) bounds.width();
params.height = (int) bounds.height();
params.x = (int) bounds.left;
params.y = (int) bounds.top;
video.requestLayout();
video.setVisibility(View.VISIBLE);
video.setFocusable(true);
video.setFocusableInTouchMode(true);
video.requestFocus();
File file = new File(videoUrl);
video.setVideoPath(file.getAbsolutePath());
video.start();
}
But the Video ins't getting resized to the bounds I specified.
Any tips?
Another related question is, how to make the MediaController show over the VideoView?