Custom Notification Style(First Time on Any App Builder)

Want to create custom notification to statusBar like this ??

Follow next,

Requirements -

  1. Little bit knowledge of xml
  2. Android Studio
  3. Curiosity :wink:

Let’s get started

Step 1 (Component Section)

Import some components.

Step 2 (Xml Section)

In your android studio create any design.

Example -

<ImageView
        android:id="@+id/image"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="fitXY"
        android:src="@mipmap/ic_launcher" />

    <TextView
        android:id="@+id/text"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="Hii, this is a custom image notification with text.
        This notification is built by Vraj Panchal and made on Appzard
        by using Notification Style component.
        How is this notification ??
        Thankyou 😊😊"
        android:textColor="#151515"
        android:textSize="17dp"
        android:textStyle="bold" />
Step 3 (Xml in notepad)

Copy paste your xml from android studio to notepad into relative view like this -

and save file as .xml

Step 4 (Final Setup)

Import .xml file in asset.

Then,

In Notification Style component , set custom notification source to .xml file

image

Step 5 (Blocks Section)

Here, viewId is set to “image” because in your xml file you set ImageView id to image.

image

Next,

Same here viewId is set to “text” as you have set TextView id to text in your xml file.

Yup Completed

CustomNotificationStyle.xml
TestNotification.apk

You can try creating more codes like this one and post your work here.

Kindness multiplies Kindness, So be Kind :slightly_smiling_face:

Some Useful Links -

Appzard Home
Custom Notification Layout Android Studio
Custom Notification Layout StackOverFlow
Custom Notification Layout Degoo

8 Likes

Nice guide :smiley:. BTW, In next release, there are more blocks for Custom Notification.

3 Likes

This update contains more blocks for Custom Notification

4 Likes

great guide

4 Likes