aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-04-25 15:26:09 -0700
committerAllan Wang <me@allanwang.ca>2019-04-25 15:26:09 -0700
commit0b262754ad8489bda1ad21494b847652eb125aec (patch)
tree008b3dfd3ed44d1a6d3518a33d4a00ed65732bba /app/src/main/res
parentae6fdc31eb3c6d71391e825f7d3575b3565b8aea (diff)
parent00f25fee8c1b1f002a92d6c9b16088b1b8b33ba4 (diff)
downloadfrost-0b262754ad8489bda1ad21494b847652eb125aec.tar.gz
frost-0b262754ad8489bda1ad21494b847652eb125aec.tar.bz2
frost-0b262754ad8489bda1ad21494b847652eb125aec.zip
Merge dev
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/ic_fdroid_24.xml5
-rw-r--r--app/src/main/res/drawable/notification_widget_preview.xml48
-rw-r--r--app/src/main/res/layout/widget_notification_item.xml46
-rw-r--r--app/src/main/res/layout/widget_notifications.xml31
-rw-r--r--app/src/main/res/values/dimens.xml2
-rw-r--r--app/src/main/res/values/strings.xml12
-rw-r--r--app/src/main/res/values/strings_no_translate.xml1
-rw-r--r--app/src/main/res/values/strings_pref_behaviour.xml2
-rw-r--r--app/src/main/res/xml/frost_changelog.xml17
-rw-r--r--app/src/main/res/xml/notification_widget_info.xml10
10 files changed, 172 insertions, 2 deletions
diff --git a/app/src/main/res/drawable/ic_fdroid_24.xml b/app/src/main/res/drawable/ic_fdroid_24.xml
new file mode 100644
index 00000000..2c718fa6
--- /dev/null
+++ b/app/src/main/res/drawable/ic_fdroid_24.xml
@@ -0,0 +1,5 @@
+<!-- Adapted from https://gitlab.com/fdroid/artwork/blob/master/fdroid-logo-2015/default_notification.svg -->
+<vector android:height="24dp" android:viewportHeight="48"
+ android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="#fff" android:fillType="evenOdd" android:pathData="M2.82,1.24A1.25,1.25 0,0 0,1.8 3.27l3.6,4.66L5.2,16a3,3 0,0 0,3 3h32a3,3 0,0 0,3 -3c0,-7.38 -0.08,-7.74 -0.2,-8.07l3.6,-4.66a1.25,1.25 0,0 0,-1.06 -2.03,1.25 1.25,0 0,0 -0.93,0.5L41.2,6.18a2.99,2.99 0,0 0,-0.98 -0.18c-32.35,0 -32.68,0.07 -33,0.18L3.79,1.74a1.25,1.25 0,0 0,-0.96 -0.5zM14.58,9.75a3.38,3.38 0,0 1,3.37 3.38,3.38 3.38,0 0,1 -3.37,3.37 3.38,3.38 0,0 1,-3.38 -3.38,3.38 3.38,0 0,1 3.38,-3.37zM34.08,9.75a3.38,3.38 0,0 1,3.37 3.38,3.38 3.38,0 0,1 -3.37,3.37 3.38,3.38 0,0 1,-3.38 -3.38,3.38 3.38,0 0,1 3.38,-3.37zM8.2,20a2.97,2.97 0,0 0,-3 2.97L5.2,43a3,3 0,0 0,3 3h32a3,3 0,0 0,3 -3L43.2,22.97a2.97,2.97 0,0 0,-2.4 -2.91L8.21,20z"/>
+</vector>
diff --git a/app/src/main/res/drawable/notification_widget_preview.xml b/app/src/main/res/drawable/notification_widget_preview.xml
new file mode 100644
index 00000000..a03fd362
--- /dev/null
+++ b/app/src/main/res/drawable/notification_widget_preview.xml
@@ -0,0 +1,48 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="30dp"
+ android:height="40dp"
+ android:viewportWidth="300"
+ android:viewportHeight="400">
+ <path
+ android:pathData="M0,0h300v400H0V0z"
+ android:fillColor="#fafafa"/>
+ <path
+ android:pathData="M0,0h300v50H0V0z"
+ android:fillColor="@color/facebook_blue"/>
+ <path
+ android:pathData="M65,170a20,20 0,1 1,-40 0,20 20,0 0,1 40,0z"
+ android:fillColor="#DE000000"/>
+ <path
+ android:pathData="M85,150h184v11H85v-11z"
+ android:fillColor="#DE000000"/>
+ <path
+ android:pathData="M85,179h146v11H85v-11z"
+ android:fillColor="#DE000000"/>
+ <path
+ android:pathData="M65,95a20,20 0,1 1,-40 0,20 20,0 0,1 40,0z"
+ android:fillColor="#DE000000"/>
+ <path
+ android:pathData="M85,75h184v11H85V75z"
+ android:fillColor="#DE000000"/>
+ <path
+ android:pathData="M85,104h146v11H85v-11z"
+ android:fillColor="#DE000000"/>
+ <path
+ android:pathData="M65,245a20,20 0,1 1,-40 0,20 20,0 0,1 40,0z"
+ android:fillColor="#DE000000"/>
+ <path
+ android:pathData="M85,225h184v11H85v-11z"
+ android:fillColor="#DE000000"/>
+ <path
+ android:pathData="M85,254h146v11H85v-11z"
+ android:fillColor="#DE000000"/>
+ <path
+ android:pathData="M65,320a20,20 0,1 1,-40 0,20 20,0 0,1 40,0z"
+ android:fillColor="#DE000000"/>
+ <path
+ android:pathData="M85,300h184v11H85v-11z"
+ android:fillColor="#DE000000"/>
+ <path
+ android:pathData="M85,329h146v11H85v-11z"
+ android:fillColor="#DE000000"/>
+</vector>
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
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..4c42be85
--- /dev/null
+++ b/app/src/main/res/layout/widget_notifications.xml
@@ -0,0 +1,31 @@
+<?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:orientation="vertical">
+
+ <LinearLayout
+ android:id="@+id/widget_layout_toolbar"
+ 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_frost"
+ android:layout_width="@dimen/toolbar_icon_size"
+ android:layout_height="@dimen/toolbar_icon_size"
+ android:layout_gravity="center_vertical"
+ android:layout_margin="@dimen/kau_padding_small"
+ android:background="?android:selectableItemBackgroundBorderless" />
+
+ </LinearLayout>
+
+ <ListView
+ android:id="@+id/widget_notification_list"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
+</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..847e74cb 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">24dp</dimen>
</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 5fd35613..0c2e625c 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -62,4 +62,16 @@
<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
+
+ The first element is the day, and the second element is the time
+ -->
+ <string name="time_template">%1s at %2s</string>
+
</resources>
diff --git a/app/src/main/res/values/strings_no_translate.xml b/app/src/main/res/values/strings_no_translate.xml
index 9eb85dc2..d9aa6cee 100644
--- a/app/src/main/res/values/strings_no_translate.xml
+++ b/app/src/main/res/values/strings_no_translate.xml
@@ -6,6 +6,7 @@
<string name="translation_url" translatable="false">https://crwd.in/frost-for-facebook</string>
<string name="github_url" translatable="false">https://github.com/AllanWang/Frost-for-Facebook</string>
<string name="github_downloads_url" translatable="false">https://github.com/AllanWang/Frost-for-Facebook/releases</string>
+ <string name="fdroid_url" translatable="false">https://f-droid.org/en/packages/com.pitchedapps.frost</string>
<string name="reddit_url" translatable="false">https://www.reddit.com/r/FrostForFacebook</string>
<string name="slack_url" translatable="false">https://frost-slack.allanwang.ca</string>
<string name="xda_url" translatable="false">https://forum.xda-developers.com/android/apps-games/app-frost-facebook-t3685896</string>
diff --git a/app/src/main/res/values/strings_pref_behaviour.xml b/app/src/main/res/values/strings_pref_behaviour.xml
index 62e94112..77c35c1c 100644
--- a/app/src/main/res/values/strings_pref_behaviour.xml
+++ b/app/src/main/res/values/strings_pref_behaviour.xml
@@ -17,6 +17,8 @@
<string name="force_message_bottom_desc">When loading a message thread, trigger a scroll to the bottom of the page rather than loading the page as is.</string>
<string name="enable_pip">Enable PIP</string>
<string name="enable_pip_desc">Enable picture in picture videos</string>
+ <string name="autoplay_settings">Autoplay Settings</string>
+ <string name="autoplay_settings_desc">Open Facebook\'s auto play settings. Note that it must be disabled for PIP to work.</string>
<string name="exit_confirmation">Exit Confirmation</string>
<string name="exit_confirmation_desc">Show confirmation dialog before exiting the app</string>
<string name="analytics">Analytics</string>
diff --git a/app/src/main/res/xml/frost_changelog.xml b/app/src/main/res/xml/frost_changelog.xml
index c9b8477e..560b1111 100644
--- a/app/src/main/res/xml/frost_changelog.xml
+++ b/app/src/main/res/xml/frost_changelog.xml
@@ -6,10 +6,22 @@
<item text="" />
-->
- <version title="v2.2.4" />
- <item text="Show top bar to allow sharing posts" />
+ <version title="v2.3.0" />
+ <item text="Converted internals of Facebook data storage; auto migration will only work from 2.2.x to 2.3.x" />
+ <item text="Added notification widget" />
+ <item text="" />
+ <item text="" />
+ <item text="" />
+ <item text="" />
<item text="" />
<item text="" />
+ <item text="" />
+
+ <version title="v2.2.4" />
+ <item text="Show top bar to allow sharing posts" />
+ <item text="Fix unmuting videos when autoplay is enabled" />
+ <item text="Add shortcut to toggle autoplay in settings > behaviour" />
+ <item text="Update theme" />
<version title="v2.2.3" />
<item text="Add ability to hide stories" />
@@ -17,6 +29,7 @@
<item text="Apply notification keyword filter to title as well" />
<item text="Remove round icon settings as they are the default in Facebook" />
<item text="Update theme" />
+ <item text="Update translations" />
<version title="v2.2.2" />
<item text="New marketplace shortcut" />
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..c14bbfb2
--- /dev/null
+++ b/app/src/main/res/xml/notification_widget_info.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+For sizing see:
+https://developer.android.com/guide/practices/ui_guidelines/widget_design.html#anatomy_determining_size
+-->
+<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
+ android:initialKeyguardLayout="@layout/widget_notifications"
+ android:initialLayout="@layout/widget_notifications"
+ android:minWidth="180dp"
+ android:minHeight="250dp"
+ android:previewImage="@drawable/notification_widget_preview" />