Gostaria de saber se é possivel criar uma notificação(OnGoing Notification) usando uma xml? se sim, poderiam me passar um basico com botoes e imagem?
XML:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="256dp"
android:layout_gravity="center_horizontal"
android:background="@color/white"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="256dp"
android:layout_alignParentBottom="true"
android:layout_gravity="left|center_vertical"
android:src="@mipmap/without_photo" />
<TextView
android:id="@+id/sub_title"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/next"
android:layout_alignLeft="@+id/previous"
android:layout_alignRight="@+id/next"
android:layout_alignStart="@+id/previous"
android:layout_centerVertical="true"
android:text="sub text"
android:textColor="@color/black_transparent" />
<ImageButton
android:id="@+id/next"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/Play_pause"
android:layout_marginRight="16dp"
android:background="@color/transparent"
android:baselineAlignBottom="false"
android:src="@mipmap/ic_next_black" />
<ImageView
android:id="@+id/Play_pause"
android:layout_width="27dp"
android:layout_height="32dp"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:layout_marginRight="24dp"
android:layout_toLeftOf="@+id/next"
android:background="@color/transparent"
android:longClickable="true"
android:src="@mipmap/play" />
<ImageButton
android:id="@+id/previous"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignTop="@+id/Play_pause"
android:layout_marginRight="24dp"
android:layout_toLeftOf="@+id/Play_pause"
android:background="@color/transparent"
android:src="@mipmap/ic_prev_black" />
<TextView
android:id="@+id/title_notification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/sub_title"
android:layout_alignEnd="@+id/sub_title"
android:layout_alignLeft="@+id/sub_title"
android:layout_alignRight="@+id/sub_title"
android:layout_alignStart="@+id/sub_title"
android:layout_marginBottom="16dp"
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/black" />
</RelativeLayout>