title: Music Player like control buttons in Notification Panel
body: <p>Currently I have a notification panel which has three buttons..one for opening the activity, one for pause upload and the other for resume upload.</p>
  
  <p>I want the pause upload and resume upload to have a single button like the pause/play button in Google Music Player. </p>
  
  <p>I have used <a href="https://stackoverflow.com/a/25379408/1918832">this</a> answer for building notification panel. Please suggest!</p>
  
  <p>Notification Panel Class:</p>
  
  <pre><code>public NotificationPanel(Context parent) {
  // TODO Auto-generated constructor stub
  this.parent = parent;
  nBuilder = new NotificationCompat.Builder(parent)
  .setContentTitle("Notification Title")
  .setSmallIcon(R.drawable.logo)
  .setOngoing(true);
  
  remoteView = new RemoteViews(parent.getPackageName(), R.layout.notification_layout);   
  
  
  //set the button listeners  
  
  setListeners(remoteView);
  nBuilder.setContent(remoteView);
  
  nManager = (NotificationManager) parent.getSystemService(Context.NOTIFICATION_SERVICE);
  nManager.notify(2, nBuilder.build());
  }
  
  public void setListeners(RemoteViews view){
  Intent stopNotify = new Intent(parent,HelperActivity.class);
  stopNotify.putExtra("DO", "stop");
  PendingIntent btn1 = PendingIntent.getActivity(parent, 0, stopNotify, 0);
  view.setOnClickPendingIntent(R.id.notifyStopButton, btn1); 
  
  Intent pauseUpload = new Intent(parent,HelperActivity.class);
  pauseUpload.putExtra("DO", "pause");    
  PendingIntent btn2 = PendingIntent.getActivity(parent, 1, pauseUpload, 0);
  view.setOnClickPendingIntent(R.id.uploadPauseButton, btn2); 
  
  Intent resumeUpload = new Intent(parent,HelperActivity.class);
  resumeUpload.putExtra("DO", "upload");  
  PendingIntent btn3 = PendingIntent.getActivity(parent, 2, resumeUpload, 0);
  view.setOnClickPendingIntent(R.id.uploadResumeButton, btn3); 
  
  }
  
  public void notificationCancel() {
       nManager.cancel(2);
  }
  </code></pre>