title: Custom notification with two action button
body: <p>I am using following code to generate notifications with two action button and some details. Please help me, why i am not able to see action button in notification?</p>
  
  <p>public static void sendNotification(Context mContext, int mode, String title, String message) {
      try
      {
          RemoteViews remoteViews = new RemoteViews(mContext.getPackageName(), R.layout.custom_notification);</p>
  
  <pre><code>    // Set Notification Title
      String strtitle = "Instevent";
      // Set Notification Text
      String strtext = "Event has created";
  
      // Open NotificationView Class on Notification Click
      Intent intent = new Intent(mContext, MainActivity.class);
      // Send data to NotificationView Class
      intent.putExtra("title", strtitle);
      intent.putExtra("text", strtext);
      // Open NotificationView.java Activity
      PendingIntent pIntent = PendingIntent.getActivity(mContext, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
  
      NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext)
      // Set Icon
              .setSmallIcon(R.drawable.ic_address_book)
              // Set Ticker Message
              .setTicker("Ticker message")
              // Dismiss Notification
              .setAutoCancel(true)
              // Set PendingIntent into Notification
              .setContentIntent(pIntent)
              // Set RemoteViews into Notification
              .setContent(remoteViews);
  
      // Locate and set the Image into customnotificationtext.xml
      // ImageViews
      remoteViews.setImageViewResource(R.id.nfImage, R.drawable.ic_action_accept);
      remoteViews.setTextViewText(R.id.nfEventName, "Custom notification");
      remoteViews.setTextViewText(R.id.nfEventTime, "This is a custom layout");
      remoteViews.setTextViewText(R.id.nfEventAddress, "This is a custom layout");
  
      // Create Notification Manager
      NotificationManager notificationmanager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
      // Build Notification with Notification Manager
      notificationmanager.notify(0, builder.build());
  }
  catch (Exception e)
  {
      e.printStackTrace();
      Log.print("Notification====&gt;&gt;", e.getMessage());
  }
  </code></pre>
  
  <p>}</p>
  
  <hr>
  
  <h2>custom_notification.xml</h2>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res/com.instevent"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;RelativeLayout
          android:id="@+id/rlMainNotification"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:background="@drawable/bg_rounded_white"
          android:padding="10dp" &gt;
  
          &lt;ImageView
              android:id="@+id/nfImage"
              android:layout_width="50dp"
              android:layout_height="50dp"
              android:scaleType="fitXY"
              android:src="@drawable/ic_group" /&gt;
  
          &lt;LinearLayout
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_marginLeft="5dp"
              android:layout_marginStart="5dp"
              android:layout_toEndOf="@+id/nfImage"
              android:layout_toRightOf="@+id/nfImage"
              android:orientation="vertical" &gt;
  
              &lt;TextView
                  android:id="@+id/nfEventName"
                  style="@style/BlackTextN"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:paddingLeft="5dp"
                  android:paddingRight="5dp"
                  android:singleLine="true"
                  android:text="The Big Meeting"
                  android:textSize="16sp" /&gt;
  
              &lt;TextView
                  android:id="@+id/nfEventTime"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="5dp"
                  android:paddingLeft="7dp"
                  android:paddingRight="5dp"
                  android:singleLine="true"
                  android:text="4:15 - 5:15 PM"
                  android:textColor="#8b8b8b"
                  android:textStyle="normal" /&gt;
  
              &lt;TextView
                  android:id="@+id/nfEventAddress"
                  style="@style/GrayColorN"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="2dp"
                  android:paddingLeft="7dp"
                  android:paddingRight="5dp"
                  android:singleLine="true"
                  android:text="The Big Conference Room"
                  android:textColor="#8b8b8b"
                  android:textStyle="normal" /&gt;
  
              &lt;View
                  android:layout_width="fill_parent"
                  android:layout_height="1dp"
                  android:layout_marginLeft="6dp"
                  android:layout_marginStart="6dp"
                  android:layout_marginTop="5dp"
                  android:background="#dcdcdc" /&gt;
  
              &lt;LinearLayout
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:orientation="horizontal"
                  android:weightSum="2" &gt;
  
                  &lt;TextView
                      android:id="@+id/nfDecline"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"
                      android:layout_weight="1"
                      android:drawableLeft="@drawable/ic_action_cancel"
                      android:drawablePadding="10dp"
                      android:drawableStart="@drawable/ic_action_cancel"
                      android:gravity="center_vertical"
                      android:text="@string/decline"
                      android:textColor="#676767" /&gt;
  
                  &lt;TextView
                      android:id="@+id/nfAccept"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"
                      android:layout_weight="1"
                      android:drawableLeft="@drawable/ic_action_accept"
                      android:drawablePadding="10dp"
                      android:drawableStart="@drawable/ic_action_accept"
                      android:gravity="center_vertical"
                      android:text="@string/accept"
                      android:textColor="#676767" /&gt;
              &lt;/LinearLayout&gt;
          &lt;/LinearLayout&gt;
      &lt;/RelativeLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>