title: Android 'Couldn't expand remoteViews for...' when creating layout programmatically
body: <p>I'm trying to build my own layout programmatically then 'building' <code>RemoteViews</code> and show it as a notification.  </p>
  
  <p>Skeleton :</p>
  
  <pre><code>LinearLayout baseLayout = new LinearLayout(context);
  for (X) {
      LinearLayout innerLayout = new LinearLayout(context);
          for (Y) {
              TextView textV = new TextView(context);
          }
          innerLayout.addView(textV);
      }
      baseLayout.addView(innerLayout);
  }
  RemoteViews remoteView = new RemoteViews(getPcakageName(), baseLayout.getId());
  </code></pre>
  
  <p>For each Layout I set <code>LayoutParams</code>, <code>orientation</code> and <code>ID</code> from the method presented here : <a href="https://stackoverflow.com/a/15442898/1405268">https://stackoverflow.com/a/15442898/1405268</a>.</p>
  
  <p>When I try to start the notification with the <code>RemoteViews</code>, I get `Bad notification posted from package XXX: Couldn't expand RemoteViews for StatusBarNotification...</p>
  
  <p>Thanks</p>