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

  • SEARCH
  • Home
  • 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 820231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:26:32+00:00 2026-05-15T02:26:32+00:00

I have an app that displays a video using VideoView. The layout consists of

  • 0

I have an app that displays a video using VideoView. The layout consists of a Clock and a VideoView laid out in a simple vertical LinearLayout.

Here’s my code snippet that I use:

VideoView mVideoView = new VideoView(this);
mVideoView.setVideoPath(myVideoURL);
mVideoView.requestFocus();
mVideoView.start();

Since the buffering of the video takes about 8-10 seconds, the layout comes up with the Clock, but the VideoView stays blank. What I want to achieve is this:

— Display an ImageView for the 10s while the video is buffering
— Detect when the video is ready to be played (onPrepared?)
— Show the Clock and VideoView and start the Video

Anyone have pointers on how to go about this?

Thanks
Chris

  • 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-05-15T02:26:32+00:00Added an answer on May 15, 2026 at 2:26 am

    MediaPlayer will let you register an OnPreparedListener callback which you can use to determine when the video is ready to be started. So you would show your ImageView instead of your VideoView first, then when your callback gets called, change to the VideoView and start playing.

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

Sidebar

Related Questions

I have a simple app that just displays a UIImageView. For some reason the
We have an Augmented Reality app that displays either a video or a 3D
I have an app that displays 9 UIImageViews, and I'm adding in the ability
I have an app that displays 9 UIImageViews, and I'm trying to add in
We have a backbone.js app that displays a number of forms to the user.
I have a test winforms app with ThreadExceptionHandler that displays a message box when
I have a iPhone/iPad app (universal binary) with a regular UIWebView that displays webpages
What I have is an app that displays some documents. In the string resources
I have an app that displays the Maidenhead grid square corresponding to that location.
Let's say I have a Rails 3 app that displays videos. The user can

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.