aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/layout/widget_notification_item.xml
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-04-25 13:56:40 -0700
committerGitHub <noreply@github.com>2019-04-25 13:56:40 -0700
commit00e04ce269197053a8cd8ae522c95629541181a1 (patch)
treeff913af0ff20f5d415428ac231372da13b9a6639 /app/src/main/res/layout/widget_notification_item.xml
parent51e71caf4063702d88ad07b71a2cf9257175f71e (diff)
parentcf152584b544425e0ee3ae28d765dc7e55a196af (diff)
downloadfrost-00e04ce269197053a8cd8ae522c95629541181a1.tar.gz
frost-00e04ce269197053a8cd8ae522c95629541181a1.tar.bz2
frost-00e04ce269197053a8cd8ae522c95629541181a1.zip
Merge pull request #1406 from AllanWang/feature/notif-widget
Feature/notif-widget
Diffstat (limited to 'app/src/main/res/layout/widget_notification_item.xml')
-rw-r--r--app/src/main/res/layout/widget_notification_item.xml46
1 files changed, 46 insertions, 0 deletions
diff --git a/app/src/main/res/layout/widget_notification_item.xml b/app/src/main/res/layout/widget_notification_item.xml
new file mode 100644
index 00000000..f36f2766
--- /dev/null
+++ b/app/src/main/res/layout/widget_notification_item.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/item_frame"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?android:selectableItemBackground"
+ android:orientation="horizontal"
+ android:paddingStart="@dimen/kau_activity_horizontal_margin"
+ android:paddingTop="@dimen/kau_activity_vertical_margin"
+ android:paddingEnd="@dimen/kau_activity_horizontal_margin"
+ android:paddingBottom="@dimen/kau_activity_vertical_margin">
+
+ <ImageView
+ android:id="@+id/item_avatar"
+ android:layout_width="@dimen/avatar_image_size"
+ android:layout_height="@dimen/avatar_image_size" />
+
+ <!--
+ Unlike the actual notification panel,
+ we do not show thumbnails, and we limit the title length
+ -->
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/kau_padding_normal"
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/item_content"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:lines="2" />
+
+ <TextView
+ android:id="@+id/item_date"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:lines="1"
+ android:textSize="12sp" />
+
+ </LinearLayout>
+</LinearLayout> \ No newline at end of file