summaryrefslogtreecommitdiff
path: root/org.fox.ttrss/src/main/res
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-02-17 18:26:09 +0300
committerAndrew Dolgov <[email protected]>2017-02-17 18:26:09 +0300
commitb80e383511d2dd05069b3db95c62095c4dff2815 (patch)
treef0ca2091a76d6e7647e9272a3839eee2636c5b91 /org.fox.ttrss/src/main/res
parentefd940c88d4c51fa56bb9a1c77a3527df83a54b8 (diff)
implement swipe to dismiss
Diffstat (limited to 'org.fox.ttrss/src/main/res')
-rw-r--r--org.fox.ttrss/src/main/res/layout/fragment_headlines.xml4
-rw-r--r--org.fox.ttrss/src/main/res/layout/headlines_row_undo.xml29
-rwxr-xr-xorg.fox.ttrss/src/main/res/values/strings.xml2
-rwxr-xr-xorg.fox.ttrss/src/main/res/xml/preferences.xml6
4 files changed, 39 insertions, 2 deletions
diff --git a/org.fox.ttrss/src/main/res/layout/fragment_headlines.xml b/org.fox.ttrss/src/main/res/layout/fragment_headlines.xml
index 7b7244a3..ddca91fd 100644
--- a/org.fox.ttrss/src/main/res/layout/fragment_headlines.xml
+++ b/org.fox.ttrss/src/main/res/layout/fragment_headlines.xml
@@ -11,12 +11,12 @@
android:layout_width="match_parent"
android:layout_height="match_parent" >
- <ListView
+ <com.nhaarman.listviewanimations.itemmanipulation.DynamicListView
android:id="@+id/headlines_list"
android:drawSelectorOnTop="true"
android:layout_width="match_parent"
android:layout_height="match_parent" >
- </ListView>
+ </com.nhaarman.listviewanimations.itemmanipulation.DynamicListView>
</android.support.v4.widget.SwipeRefreshLayout>
<!-- <TextView
diff --git a/org.fox.ttrss/src/main/res/layout/headlines_row_undo.xml b/org.fox.ttrss/src/main/res/layout/headlines_row_undo.xml
new file mode 100644
index 00000000..56c79056
--- /dev/null
+++ b/org.fox.ttrss/src/main/res/layout/headlines_row_undo.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/headlines_row_undo"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:background="?colorPrimaryDark"
+ android:orientation="horizontal"
+ android:paddingLeft="16dp"
+ android:weightSum="1">
+
+ <TextView
+ android:background="@drawable/ripple"
+ android:id="@+id/top_changed_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@android:color/primary_text_dark"
+ android:text="@string/headline_undo_row_prompt"
+ android:layout_weight="1" />
+
+ <Button
+ android:background="@drawable/ripple"
+ android:id="@+id/headlines_row_undo_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@android:color/primary_text_dark"
+ android:text="@string/headline_undo_row_button" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/org.fox.ttrss/src/main/res/values/strings.xml b/org.fox.ttrss/src/main/res/values/strings.xml
index a3de6fc6..1d44547b 100755
--- a/org.fox.ttrss/src/main/res/values/strings.xml
+++ b/org.fox.ttrss/src/main/res/values/strings.xml
@@ -243,4 +243,6 @@
<string name="open_with">Open with…</string>
<string name="confirm_catchup_above">Mark articles as read?</string>
<string name="dialog_ok">OK</string>
+ <string name="headline_undo_row_button">UNDO</string>
+ <string name="headline_undo_row_prompt">Marked as read</string>
</resources>
diff --git a/org.fox.ttrss/src/main/res/xml/preferences.xml b/org.fox.ttrss/src/main/res/xml/preferences.xml
index 2341cd78..711d18be 100755
--- a/org.fox.ttrss/src/main/res/xml/preferences.xml
+++ b/org.fox.ttrss/src/main/res/xml/preferences.xml
@@ -84,6 +84,12 @@
android:summary="@string/pref_headlines_show_content_long"
android:title="@string/pref_headlines_show_content" />
+ <org.fox.ttrss.util.LessBrokenSwitchPreference
+ android:defaultValue="true"
+ android:key="headlines_swipe_to_dismiss"
+ android:summary="Disables headlines context menu"
+ android:title="Swipe to dismiss" />
+
<!-- <org.fox.ttrss.util.LessBrokenSwitchPreference
android:defaultValue="true"
android:key="headlines_show_flavor_image"