dividers for blacklist

This commit is contained in:
danijoo
2016-01-08 17:41:46 +01:00
parent 7bbab941d7
commit 63cc1f2a2b
4 changed files with 32 additions and 6 deletions

View File

@@ -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);
}

View 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>

View 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" />

View File

@@ -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>