aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-04-24 19:12:25 -0700
committerAllan Wang <me@allanwang.ca>2019-04-24 19:12:25 -0700
commit7e227078373adf0ef8c243b7e1e05804524cd3ea (patch)
treebd6585c85a7641555e4bd9c10fa919145a5ba6df /app/src/main/res
parent9df2a878226fb5f7adcf1af61a1ce87dff826fbc (diff)
downloadfrost-7e227078373adf0ef8c243b7e1e05804524cd3ea.tar.gz
frost-7e227078373adf0ef8c243b7e1e05804524cd3ea.tar.bz2
frost-7e227078373adf0ef8c243b7e1e05804524cd3ea.zip
Add click events to notifications
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/widget_notification_item.xml15
-rw-r--r--app/src/main/res/layout/widget_notifications.xml9
-rw-r--r--app/src/main/res/values/strings.xml10
3 files changed, 19 insertions, 15 deletions
diff --git a/app/src/main/res/layout/widget_notification_item.xml b/app/src/main/res/layout/widget_notification_item.xml
index d02e2611..f36f2766 100644
--- a/app/src/main/res/layout/widget_notification_item.xml
+++ b/app/src/main/res/layout/widget_notification_item.xml
@@ -1,22 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/item_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:clickable="true"
- android:focusable="true"
+ 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"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
+ android:layout_height="@dimen/avatar_image_size" />
<!--
Unlike the actual notification panel,
@@ -26,6 +23,7 @@
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/kau_padding_normal"
android:layout_weight="1"
android:orientation="vertical">
@@ -33,8 +31,6 @@
android:id="@+id/item_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/kau_padding_normal"
- android:layout_marginEnd="@dimen/kau_padding_normal"
android:ellipsize="end"
android:lines="2" />
@@ -42,12 +38,9 @@
android:id="@+id/item_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/kau_padding_normal"
- android:layout_marginEnd="@dimen/kau_padding_normal"
android:ellipsize="end"
android:lines="1"
android:textSize="12sp" />
</LinearLayout>
-
</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/widget_notifications.xml b/app/src/main/res/layout/widget_notifications.xml
index 098bb9eb..4c42be85 100644
--- a/app/src/main/res/layout/widget_notifications.xml
+++ b/app/src/main/res/layout/widget_notifications.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/widget_layout_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:id="@+id/widget_layout_container"
android:orientation="vertical">
<LinearLayout
@@ -14,12 +14,13 @@
android:paddingEnd="@dimen/kau_padding_small">
<ImageView
- android:id="@+id/img_refresh"
+ android:id="@+id/img_frost"
android:layout_width="@dimen/toolbar_icon_size"
- android:layout_margin="@dimen/kau_padding_small"
android:layout_height="@dimen/toolbar_icon_size"
android:layout_gravity="center_vertical"
- android:src="@drawable/ic_refresh_24dp" />
+ android:layout_margin="@dimen/kau_padding_small"
+ android:background="?android:selectableItemBackgroundBorderless" />
+
</LinearLayout>
<ListView
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 5fd35613..2b6a2ba6 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -62,4 +62,14 @@
<string name="no_new_notifications">No new notifications found</string>
+ <string name="today">Today</string>
+ <string name="yesterday">Today</string>
+ <!--
+ Template used to display human readable string;
+ For instance:
+ Today at 1:23 PM
+ Mar 13 at 9:00 AM
+ -->
+ <string name="time_template">%s at %s</string>
+
</resources>