0
listview code
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="#000000"
android:dividerHeight="2dp"
android:id="@+id/list_notify"
>
</ListView>
</FrameLayout
code of the items that are contained in Listview
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/list_item_selector">
<ImageView
android:id="@+id/imageView_lista_notify"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_margin="4dp"
android:src="@drawable/ic_menu_gallery" />
<TextView
android:id="@+id/texto_hora_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="TextView"
app:layout_constraintLeft_toRightOf="@+id/imageView_lista_notify"
android:layout_marginLeft="8dp"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="4dp" />
<TextView
android:id="@+id/texto_notificacao_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"
android:text="TextView"
app:layout_constraintLeft_toRightOf="@+id/imageView_lista_notify"
android:layout_marginLeft="8dp"
app:layout_constraintTop_toBottomOf="@+id/texto_hora_list" />
<ImageButton
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@android:drawable/ic_delete"
android:layout_marginRight="8dp"
app:layout_constraintRight_toRightOf="parent"
android:id="@+id/imageButton"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="10dp" />
</android.support.constraint.ConstraintLayout>
Related: How to keep the selected item color fixed
– ramaral