Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8002803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:28:34+00:00 2026-06-04T16:28:34+00:00

I want to make layout like the attached image but the problem is when

  • 0

a busy cat

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:28:36+00:00Added an answer on June 4, 2026 at 4:28 pm

    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 call mediaPlayer.play(), mediaPlayer.pause() etc.

    for this purpose, you will be needing to implement SurfaceHolder.callback interface as follow:

    public class VideoViewActivity extends Activity implements SurfaceHolder.Callback 
    {
    
    public boolean canPause() 
    {
    // TODO Auto-generated method stub
    
        Log.e("paused ","called");
        return true;
    }
    
    
    public boolean canSeekBackward() {
        // TODO Auto-generated method stub
        return true;
    }
    
    
    public boolean canSeekForward() {
        // TODO Auto-generated method stub
        return true;
    }
    
    
    public int getBufferPercentage()
    {
        // TODO Auto-generated method stu
        return 0;
    }
    
    
    public int getCurrentPosition() 
    {
        // TODO Auto-generated method stub
    
        return mMediaPlayer.getCurrentPosition();
    
    
    }
    
    
    public int getDuration() 
    {
        // TODO Auto-generated method stub
        return mMediaPlayer.getDuration();
    }
    
    
    public boolean isPlaying() 
        {
        // TODO Auto-generated method stub
        return mMediaPlayer.isPlaying(); 
    }
    
    
    public void pause() {
        // TODO Auto-generated method stub
        mMediaPlayer.pause();
    }
    
    
    public void seekTo(int pos) {
        // TODO Auto-generated method stub
    
        mMediaPlayer.seekTo(pos);
    
    }
    
    
    public void start()
    {
        // TODO Auto-generated method stub
        mMediaPlayer.start();
    }
    

    }

    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 then mediaPlayer.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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In My application i want to create the layout as like below image: So
Here's what I tried: http://jsfiddle.net/tJxCD/6/ I want to create a layout like this: But
I want to make layout like this: The problem is with aligning TextViews: I
JSFIDDLE EXAMPLE BELOW I want to make the following CSS layout and currently im
I have created a custom tab layout which look like this,I want to make
![enter image description here][1] I want to make a tab layout application, in which
I want to make my layout for my first tab something like this: I
For example,I want to make a layout like this: The 'header' can have a
What I want to do is, make layout like this: Title Date Long text
I want to make something like the one below. However for some reason, the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.