public static RemoteViews createRemoteViews(Context context,boolean showPlayIcon){
  RemoteViews remoteViews=new RemoteViews(context.getPackageName(),R.layout.remote_view);
  int iconRes=showPlayIcon ? R.drawable.ic_play : R.drawable.ic_stop;
  remoteViews.setImageViewResource(R.id.play_pause,iconRes);
  return remoteViews;
}

public static RemoteViews createRemoteViews ( Context context , boolean showPlayIcon ) { RemoteViews remoteViews = new RemoteViews ( context . getPackageName ( ) , R . layout . remote_view ) ; int iconRes = showPlayIcon ? R . drawable . ic_play : R . drawable . ic_stop ; remoteViews . setImageViewResource ( R . id . play_pause , iconRes ) ; return remoteViews ; }
creates a remoteviews that will be shown as the bottom bar of the custom tab .
