dividers for blacklist
This commit is contained in:
@@ -10,6 +10,7 @@ import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.headlezz.notificationlogger.PackageUtils;
|
||||
import net.headlezz.notificationlogger.R;
|
||||
import net.headlezz.notificationlogger.logger.BlacklistItem;
|
||||
import net.headlezz.notificationlogger.logger.BlacklistTable;
|
||||
import net.headlezz.notificationlogger.notificationlist.CursorRecyclerViewAdapter;
|
||||
@@ -62,7 +63,7 @@ public class BlacklistListAdapter extends CursorRecyclerViewAdapter implements V
|
||||
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(android.R.layout.simple_list_item_2, parent, false);
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.blacklist_frag_item, parent, false);
|
||||
view.setOnLongClickListener(this);
|
||||
return new BlacklistViewHolder(view);
|
||||
}
|
||||
|
||||
20
app/src/main/res/layout/blacklist_frag_item.xml
Normal file
20
app/src/main/res/layout/blacklist_frag_item.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:foreground="?attr/selectableItemBackground">
|
||||
|
||||
<include layout="@android:layout/simple_list_item_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
/>
|
||||
|
||||
<include
|
||||
layout="@layout/list_seperator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
5
app/src/main/res/layout/list_seperator.xml
Normal file
5
app/src/main/res/layout/list_seperator.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<View xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?attr/colorControlHighlight" />
|
||||
@@ -82,12 +82,12 @@
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
tools:text="Some messages wit lots of text and \nTwo lines" />
|
||||
|
||||
<View
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_below="@+id/notification_item_message"
|
||||
android:background="?attr/colorControlHighlight"
|
||||
<include
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp" />
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@+id/notification_item_message"
|
||||
android:layout_marginTop="8dp"
|
||||
layout="@layout/list_seperator" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user