title: Change the icon dynamically in android notification
body: <p>My icons are having names <code>icon_1</code>, <code>icon_2</code>, <code>icon_3</code> and so on. And I want to change the icon in the notification dynamically according to the input. The input is a number ranging from 1 to 100.
  if the input is 1 then <code>icon_1</code> should be shown, if input is 2 then <code>icon_2</code> will be shown and so on. Is it possible to set the icon in one line or we are forced to use switch case statement? The example with the code I am pasting here to better understand. Switch case statement definitely will help out but only want to know if it is possible to write in one line to save 100 lines of code. </p>
  
  <p>The following lines of code may not work. But just for understanding the things,  I have used. 
  Input is a number in the variable name of <code>num</code>.</p>
  
  <pre><code>Intent intent = new Intent(this, NotificationReceiver.class);
  PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent, 0);
  Notification n  = new Notification.Builder(this)
      .setContentText("Subject")
      .setSmallIcon(R.drawable.icon_+"num")  //Here is the doubt..How can we modify this line to work
      .setContentIntent(pIntent)
      .setAutoCancel(true)
       .build();
  NotificationManager notificationManager=NotificationManager)mContext.getSystemService(Context.NOTIFICATION_SERVICE);
  notificationManager.notify(0, n); 
  </code></pre>