Code example for MediaController

Methods: hide, isShowing

0
    final Uri uri = getArguments().<Uri>getParcelable(EXTRA_SOURCE_URI);
    videoView.setVideoURI(uri);
  } 
 
  public void invalidateView() { 
    final boolean show = controller != null && controller.isShowing();
    if (DEBUG) { Log.d(TAG, "Invalidate view, controller showing: " + show); }
    if (show) {
      controller.hide();
      // XXX don't know when we have new dimensions, it should be done with something like requestLayout 
      final long delay = 250;
      handler.removeCallbacks(showController);
      handler.postDelayed(showController, delay);
    } 
  } 
 
  /** 
   * Error dialog. 
   * @author Roman Mazur (Stanfy - http://www.stanfy.com) 
   */ 
  public static class ErrorDialogFragment extends BaseDialogFragment {