title: How do I get the big picture of my custom notification take the whole width of the notification while also keeping the Android system decorations?
body: <p>I have an app currently with 19 (KitKat) as the min sdk. </p>
  
  <p>I need a notification that acts as a mix of <a href="https://developer.android.com/training/notify-user/expanded#image-style" rel="noreferrer">BigPictureStyle</a> and <a href="https://developer.android.com/training/notify-user/expanded#large-style" rel="noreferrer">BigTextStyle</a>. For that, I am using remote views alongside <a href="https://developer.android.com/training/notify-user/custom-notification#custom-content" rel="noreferrer">DecoratedCustomViewStyle</a> to get the desired effect, but the result is that the big image doesn't take the whole width, and instead I get this:</p>
  
  <p><a href="https://i.stack.imgur.com/mJSRu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mJSRu.png" alt="the big image doesn&#39;t take the whole width"></a></p>
  
  <p>The problem shouldn't be the image size I'm using, because removing <code>DecoratedCustomViewStyle</code> from the notification builder fixes the width problem, but without it, I don't get all the system decorations(see image below), and the requirement is to the have them too.</p>
  
  <p><a href="https://i.stack.imgur.com/TzW1H.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TzW1H.png" alt="Image size ok, but no system decorations"></a></p>
  
  <p>I also found <a href="http://docs.accengage.com/display/AND/Notification+Templates" rel="noreferrer">Accengage's notifications templates</a> where they have this style called <em>BigTextBigPicture</em> which is exactly what I need, but while they provide the layout files, I cannot get it to work for phones with Nougat and above, as I am getting the same result that I got by removing <code>DecoratedCustomViewStyle</code>, so no system decorations.</p>
  
  <p>Here is the notification builder:</p>
  
  <pre><code>RemoteViews notificationLayout = new RemoteViews(getPackageName(), R.layout.notification_small);
  RemoteViews notificationLayoutExpanded = new RemoteViews(getPackageName(), R.layout.notification_large);
  NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(getApplicationContext(),
          Constants.CHANNEL_ID)
          .setSmallIcon(R.drawable.my_app_logo)
          .setPriority(NotificationCompat.PRIORITY_DEFAULT)
          .setCustomContentView(notificationLayout)
          .setCustomBigContentView(notificationLayoutExpanded)
          .setStyle(new NotificationCompat.DecoratedCustomViewStyle());
  </code></pre>
  
  <p>Here is the notification_large layout</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
      android:layout_height="256dp"
      android:orientation="vertical"&gt;
          &lt;TextView
              android:id="@+id/title"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:ellipsize="end"
              android:fadingEdge="horizontal"
              android:maxLines="2"
              style="@style/TextAppearance.Compat.Notification.Title"
              android:text="@string/notification_test_title"/&gt;
  
          &lt;TextView
              android:id="@+id/msg"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:ellipsize="end"
              android:fadingEdge="horizontal"
              android:maxLines="6"
              style="@style/TextAppearance.Compat.Notification"
              android:text="@string/notification_test_msg"/&gt;
  
      &lt;ImageView
          android:layout_marginStart="2dp"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:src="@drawable/test_cute_kirby"
          android:scaleType="fitXY"/&gt;
  
  &lt;/LinearLayout&gt;</code></pre>
  </div>
  </div>
  </p>