Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Your XML Layout</strong> </p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="3dp" &gt; &lt;ImageView android:id="@+id/image" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="10dp" /&gt; &lt;TextView android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="fill_parent" android:textColor="#000" /&gt; &lt;/LinearLayout&gt; </code></pre> <p><strong>Your Code</strong></p> <pre><code>RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.custom_notification_layout); contentView.setImageViewResource(R.id.image, R.drawable.notification_image); contentView.setTextViewText(R.id.text, "Hello, this message is in a custom expanded view"); notification.contentView = contentView; Intent notificationIntent = new Intent(this, MyClass.class); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); notification.contentIntent = contentIntent; </code></pre> <p><strong>Sending Notification</strong></p> <pre><code>mNotificationManager.notify(CUSTOM_VIEW_ID, notification); </code></pre> <p>Reference :- <a href="ftp://ftp.gunadarma.ac.id/android/sdk/sdk_310712/docs/guide/topics/ui/notifiers/notifications.html" rel="nofollow">ftp://ftp.gunadarma.ac.id/android/sdk/sdk_310712/docs/guide/topics/ui/notifiers/notifications.html</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload