Code example for ImageButton

Methods: setEnabled

0
 
  private void pause() { 
    mp.pause();
 
    play.setEnabled(true);
    pause.setEnabled(false);
    stop.setEnabled(true);
  } 
 
  private void loadClip() { 
    try { 
      mp=new MediaPlayer();
      mp.setDataSource(this,
                       PipeProvider.CONTENT_URI.buildUpon() 
                                               .appendPath("clip.ogg") 
                                               .build()); 
      mp.setOnCompletionListener(this);
      mp.prepare();
    } 
    catch (Exception e) {
      goBlooey(e);