more beautiful list divider

This commit is contained in:
danijoo
2016-01-08 17:07:11 +01:00
parent 1773657aec
commit 7bbab941d7
2 changed files with 19 additions and 11 deletions

View File

@@ -8,17 +8,19 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:foreground="?attr/selectableItemBackground" android:foreground="?attr/selectableItemBackground"
android:orientation="horizontal" android:orientation="horizontal">
android:padding="8dp">
<ImageView <ImageView
android:id="@+id/notification_item_appIcon" android:id="@+id/notification_item_appIcon"
android:layout_width="64dp" android:layout_width="@dimen/notification_list_item_size"
android:layout_height="64dp" android:layout_height="match_parent"
android:layout_marginEnd="16dp" android:paddingStart="8dp"
android:paddingEnd="16dp"
tools:src="@mipmap/ic_launcher" /> tools:src="@mipmap/ic_launcher" />
<RelativeLayout <RelativeLayout
android:layout_marginEnd="8dp"
android:paddingTop="8dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
@@ -79,15 +81,17 @@
android:maxLines="3" android:maxLines="3"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textAppearance="@style/TextAppearance.AppCompat.Body1"
tools:text="Some messages wit lots of text and \nTwo lines" /> 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"
android:layout_width="match_parent"
android:layout_height="1dp" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
<View
android:layout_gravity="bottom"
android:background="?attr/colorControlHighlight"
android:layout_height="1dp"
android:layout_width="match_parent"
/>
</FrameLayout> </FrameLayout>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="notification_list_item_size">72dp</dimen>
</resources>