aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-04-22 03:21:30 -0400
committerAllan Wang <me@allanwang.ca>2019-04-22 03:21:30 -0400
commit7f371a95320a1d8aae29f8ca15f7fd972367b60e (patch)
tree01f5e3f8a03a1030cccb29a29fedb1e9a1bc8350 /app/src/main/res
parent2fc18d0803c86a3e6892842136e9342dca31a53f (diff)
downloadfrost-7f371a95320a1d8aae29f8ca15f7fd972367b60e.tar.gz
frost-7f371a95320a1d8aae29f8ca15f7fd972367b60e.tar.bz2
frost-7f371a95320a1d8aae29f8ca15f7fd972367b60e.zip
Update parsers and add widget items
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/widget_notification_item.xml53
-rw-r--r--app/src/main/res/layout/widget_notifications.xml22
-rw-r--r--app/src/main/res/values/dimens.xml2
-rw-r--r--app/src/main/res/xml/notification_widget_info.xml4
4 files changed, 81 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..d02e2611
--- /dev/null
+++ b/app/src/main/res/layout/widget_notification_item.xml
@@ -0,0 +1,53 @@
+<?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:orientation="horizontal"
+ android:paddingStart="@dimen/kau_activity_horizontal_margin"
+ android:paddingTop="@dimen/kau_activity_vertical_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" />
+
+ <!--
+ 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_weight="1"
+ android:orientation="vertical">
+
+ <TextView
+ 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" />
+
+ <TextView
+ 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
new file mode 100644
index 00000000..fd68e20a
--- /dev/null
+++ b/app/src/main/res/layout/widget_notifications.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"
+ android:layout_width="match_parent" android:layout_height="match_parent">
+ <LinearLayout
+ android:id="@+id/widget_layout_main"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:paddingStart="@dimen/kau_padding_small"
+ android:paddingEnd="@dimen/kau_padding_small">
+ <ImageView
+ android:id="@+id/img_refresh"
+ android:layout_width="@dimen/toolbar_icon_size"
+ android:layout_height="@dimen/toolbar_icon_size"
+ android:layout_gravity="center_vertical"/>
+ </LinearLayout>
+ <ListView
+ android:id="@+id/widget_notification_list"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ </ListView>
+</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 713bd1b4..53dad5ef 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -9,4 +9,6 @@
<dimen name="tab_bar_height">50dp</dimen>
<dimen name="intro_bar_height">64dp</dimen>
<dimen name="badge_icon_size">20dp</dimen>
+
+ <dimen name="toolbar_icon_size">18dp</dimen>
</resources>
diff --git a/app/src/main/res/xml/notification_widget_info.xml b/app/src/main/res/xml/notification_widget_info.xml
new file mode 100644
index 00000000..3cb97ed7
--- /dev/null
+++ b/app/src/main/res/xml/notification_widget_info.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android">
+
+</appwidget-provider> \ No newline at end of file