
I want to make layout like the attached image but the problem is when I create media controller it doesn’t appear below the video player instead it shows on the centre bottom of activity. I’ve tried to make mediacontroller in xml file but It doesn’t work either and also tried this https://stackoverflow.com/a/10315093/1065357 but it also doesn’t work.
I am using android 4 tablet version.
Thankyou
I want to make layout like the attached image but the problem is when
Share
You can make your custom media control panel, use a bottom panel, add buttons of play,pause,stop etc. add that bottom panel layout where you you want by using
layout gravity. On the click on your custom play,pause, stop, forward etc buttons you can callmediaPlayer.play(),mediaPlayer.pause()etc.for this purpose, you will be needing to implement
SurfaceHolder.callbackinterface as follow:}
implementation of this interface will give you access to the media controlling functions(play,pause,seek etc).
Surface holder can be get as
SurfaceHolder holder= surfaceView.getHolder();and thenmediaPlayer.setDisplay(holder)you would be declaring your surfaceView tag in your videoViewActivity’s layout.
surface holder is the component that would be display the video stream of your video.
i hope this will help.