title: Add programmatically created layout in remoteview for Notification
body: <p>I'm developing an application in which I have to not use custom layout for <code>notification</code>. Instead I have to use <code>programmatically</code> created layout for <code>RemoteViews</code>. Here is what I'm doing for layout stuff:</p>
  
  <pre><code>Notification notify = new Notification.Builder(context)
              .setContentTitle("Notification")
              .setLargeIcon(
                      decodeBase64(NotificationImages.notification_ic_stat_notify))
              .build();
  
      LinearLayout linLayout = new LinearLayout(context);
  
      @SuppressWarnings("deprecation")
      Drawable bg = new BitmapDrawable(
              decodeBase64(NotificationImages.search_bg));
  
      linLayout.setOrientation(LinearLayout.HORIZONTAL);
      linLayout.setBackground(bg);
  
      LinearLayout.LayoutParams llp = new LinearLayout.LayoutParams(
              LinearLayout.LayoutParams.MATCH_PARENT,
              LinearLayout.LayoutParams.MATCH_PARENT);
  
      linLayout.setLayoutParams(llp);
  
      ImageView icon = new ImageView(context);
  
      @SuppressWarnings("deprecation")
      Drawable icon_bg = new BitmapDrawable(
              decodeBase64(NotificationImages.notification_logo));
  
      icon.setBackground(icon_bg);
  
      LinearLayout.LayoutParams image_lp = new LinearLayout.LayoutParams(
              LinearLayout.LayoutParams.WRAP_CONTENT,
              LinearLayout.LayoutParams.WRAP_CONTENT);
      image_lp.setMargins(20, 0, 0, 0);
      image_lp.gravity = Gravity.CENTER_VERTICAL;
  
      icon.setLayoutParams(image_lp);
  
      linLayout.addView(icon);
  </code></pre>
  
  <p>Ignore the use of <code>base64</code> decoding, that I was doing for some random purpose.
  So, right now what I want is to add this <code>layout</code> to <code>RemoteViews</code> for showing it on <code>notification panel</code>.
  Something like this:</p>
  
  <pre><code>RemoteViews contentView = new RemoteViews(PACKAGE_NAME,
              R.layout.persistent_notification_layout);
  </code></pre>
  
  <p>How, can I replace the <code>layout.persistent_notification_layout</code> from the layout created programmatically?
  Any kind of help will be appreciated.</p>