title: Show just small icon in status bar without showing notification
body: <p>I want to show constantly small icon in the <code>status bar</code>, without show the notification itself on the <code>notification</code> tray of the system.</p>
  
  <p>I tried using custom <code>layout</code> and set the visibility of the root element to <code>View.GONE</code>, or <code>View.INVISIBLE</code>, but for both, the system ignores it.</p>
  
  <p>I also tried to set the height of the root element but the system ignores this too.</p>
  
  <p>Here is my code:</p>
  
  <p><code>R.layout.custom_notification</code>:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/custom_notification"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_gravity="center"
      android:background="@drawable/notif_background"
      android:orientation="horizontal"
      android:baselineAligned="false"/&gt;
  </code></pre>
  
  <p>And the code for display the <code>Notification</code>:</p>
  
  <pre><code> NotificationManager nm = (NotificationManager) ctx.getSystemService(Context.NOTIFICATION_SERVICE);
   NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(ctx);
   mBuilder
           .setSmallIcon(drawableId)
           .setAutoCancel(false)
           .setOngoing(true)
           .setPriority(Notification.PRIORITY_MAX);
   Intent resultIntent = new Intent(ctx, SettingsActivity.class);
   PendingIntent resultPendingIntent = PendingIntent.getActivity(ctx, 0, resultIntent, 0);
   mBuilder.setContentIntent(resultPendingIntent);
   int layout =  R.layout.custom_notification ;
   RemoteViews contentView = new RemoteViews(ctx.getPackageName(), layout);
   contentView.setViewVisibility(R.id.custom_notification, View.INVISIBLE);
   mBuilder.setContent(contentView);
   nm.notify(NOTIFICATION_ID, mBuilder.build());
  </code></pre>
  
  <p><strong>I'm well aware that for achieving my goal I will need not documented solution. And I am also aware that UX guidelines strongly recommending to not do such a thing. So there is no point in writing me this as an answer.</strong> </p>