aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps2015-06-10 21:04:46 +0200
committerCamil Staps2015-06-10 21:04:55 +0200
commited23c6c7801d34b4e5e3348dc0fb47b05fcc7c92 (patch)
treeafa8763fb8b4aa998eb95192d00821f634c1c0ea
parentCleanup (diff)
Several minor fixes
-rw-r--r--README.md4
-rw-r--r--app/src/main/java/org/rssin/android/NavigationDrawerFragment.java9
-rw-r--r--app/src/main/java/org/rssin/android/NavigationDrawerManageFiltersFragment.java37
-rw-r--r--app/src/main/res/drawable/separator.xml9
-rw-r--r--app/src/main/res/layout/item_navigation_drawer.xml2
-rw-r--r--app/src/main/res/layout/separator_navigation_drawer.xml35
-rw-r--r--app/src/main/res/values/strings.xml8
-rw-r--r--app/src/main/res/values/styles.xml4
8 files changed, 61 insertions, 47 deletions
diff --git a/README.md b/README.md
index d784bfd..b61f651 100644
--- a/README.md
+++ b/README.md
@@ -10,15 +10,11 @@ This project is licensed under GPLv2. For more details, see the LICENSE file.
(see also the @todo markings throughout the source code)
## High priority
-* Remove redundant settings
* Hamburger menu does not highlight selected item
* Walkthrough: Hamburger menu, Unified Inbox, Settings, Filters, Feedback (Like/Dislike)
* Clickable links in articles
-* **Cannot reproduce** - Fix crash on opening an article imidiatly after coming back on the home activity
-* **Cannot reproduce** - Fix crash on tapping edit filters in hamburger in homeactivity crashes
## Normal priority
-* Background sync & notifications
* Swipe left & right for (dis)like
* Add back button to article activity
diff --git a/app/src/main/java/org/rssin/android/NavigationDrawerFragment.java b/app/src/main/java/org/rssin/android/NavigationDrawerFragment.java
index 5e6cccf..9965038 100644
--- a/app/src/main/java/org/rssin/android/NavigationDrawerFragment.java
+++ b/app/src/main/java/org/rssin/android/NavigationDrawerFragment.java
@@ -298,9 +298,14 @@ public class NavigationDrawerFragment extends Fragment {
.show();
View titleDivider = dialog.findViewById(getResources().getIdentifier("titleDivider", "id", "android"));
- titleDivider.setBackgroundColor(getResources().getColor(R.color.abc_primary_text_material_light));
+ if (titleDivider != null) {
+ titleDivider.setBackgroundColor(getResources().getColor(R.color.abc_primary_text_material_light));
+ }
+
TextView title = (TextView) dialog.findViewById(getResources().getIdentifier("alertTitle", "id", "android"));
- title.setTextColor(getResources().getColor(R.color.abc_primary_text_material_light));
+ if (title != null) {
+ title.setTextColor(getResources().getColor(R.color.abc_primary_text_material_light));
+ }
}
return super.onOptionsItemSelected(item);
diff --git a/app/src/main/java/org/rssin/android/NavigationDrawerManageFiltersFragment.java b/app/src/main/java/org/rssin/android/NavigationDrawerManageFiltersFragment.java
index 8520677..84d9a0d 100644
--- a/app/src/main/java/org/rssin/android/NavigationDrawerManageFiltersFragment.java
+++ b/app/src/main/java/org/rssin/android/NavigationDrawerManageFiltersFragment.java
@@ -1,21 +1,21 @@
-/**
- * RSSin - Clever RSS reader for Android
- * Copyright (C) 2015 Randy Wanga, Jos Craaijo, Joep Bernards, Camil Staps
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
+/**
+ * RSSin - Clever RSS reader for Android
+ * Copyright (C) 2015 Randy Wanga, Jos Craaijo, Joep Bernards, Camil Staps
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
package org.rssin.android;
import android.app.Activity;
@@ -214,6 +214,7 @@ public class NavigationDrawerManageFiltersFragment extends Fragment {
}
Filter filter = items.get(position);
+ filter.ensureFeeds(DefaultStorageProvider.getInstance(getContext()));
holder.title.setText(filter.getTitle());
holder.feeds.setText(filter.getFeeds().size() + " " + context.getString(R.string.feeds));
diff --git a/app/src/main/res/drawable/separator.xml b/app/src/main/res/drawable/separator.xml
new file mode 100644
index 0000000..28e9a5e
--- /dev/null
+++ b/app/src/main/res/drawable/separator.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_focused="true" android:drawable="@color/separator_focused"/>
+ <item android:state_pressed="true" android:drawable="@color/separator_pressed"/>
+ <item android:drawable="@color/separator"/>
+
+</selector> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_navigation_drawer.xml b/app/src/main/res/layout/item_navigation_drawer.xml
index 4c56384..86ce8cd 100644
--- a/app/src/main/res/layout/item_navigation_drawer.xml
+++ b/app/src/main/res/layout/item_navigation_drawer.xml
@@ -21,9 +21,9 @@
android:id="@+id/itemLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:orientation="vertical"
-
android:layout_marginTop="0dp"
android:background="#121212">
diff --git a/app/src/main/res/layout/separator_navigation_drawer.xml b/app/src/main/res/layout/separator_navigation_drawer.xml
index 99936ab..ad8baff 100644
--- a/app/src/main/res/layout/separator_navigation_drawer.xml
+++ b/app/src/main/res/layout/separator_navigation_drawer.xml
@@ -17,42 +17,43 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-->
<LinearLayout
-xmlns:android="http://schemas.android.com/apk/res/android"
-android:id="@+id/itemLayout"
-android:layout_width="fill_parent"
-android:layout_height="wrap_content"
-android:layout_alignParentLeft="true"
-android:orientation="vertical"
-android:layout_marginTop="0dp"
-android:background="#252525"
- >
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/itemLayout"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:orientation="vertical"
+ android:layout_marginTop="0dp">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:minHeight="35dp"
- >
+ android:background="@drawable/separator">
<TextView
android:id="@+id/separator_navigation_drawer_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#FFFFFF"
- />
+ android:textSize="@dimen/font_size_small"/>
<TextView
android:id="@+id/separator_navigation_drawer_edit"
android:layout_alignParentRight="true"
- android:layout_gravity="right"
+ android:layout_alignParentEnd="true"
+ android:layout_gravity="center_vertical|end"
+ android:gravity="center_vertical|end"
android:layout_marginRight="8dp"
+ android:layout_marginEnd="8dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#FFFFFF"
- />
+ android:textSize="@dimen/font_size_small"/>
+
</RelativeLayout>
<View
@@ -62,8 +63,6 @@ android:background="#252525"
android:layout_marginTop="1dp"
android:layout_marginLeft="0dp"
android:layout_marginRight="0dp"
- android:background="#DADADC"
-
- ></View>
+ android:background="#DADADC"/>
</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index b2194e3..8591d7b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -92,14 +92,14 @@
<string name="walkthrough_text_5">Image 5 resource.</string>
<string name="walkthrough_text_button">Skip tutorial</string>
<string name="navigation_drawer_all_feeds">All feeds</string>
- <string name="navigation_drawer_start">START</string>
- <string name="navigation_drawer_edit_filters">FILTERS</string>
- <string name="navigation_drawer_edit_feeds">FEEDS</string>
+ <string name="navigation_drawer_start">Start</string>
+ <string name="navigation_drawer_edit_filters">Filters</string>
+ <string name="navigation_drawer_edit_feeds">Feeds</string>
<string name="article_feedback_saved">Feedback saved.</string>
<string name="feeds_activity_add_feed">Add feed</string>
<string name="feeds_activity_url">URL:</string>
<string name="filter_settings_title">Title</string>
<string name="filter_settings_new_title">New title:</string>
<string name="menu_article_share">Share</string>
- <string name="navigation_drawer_edit_text">(EDIT)</string>
+ <string name="navigation_drawer_edit_text">EDIT</string>
</resources>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 5554027..5cf726d 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -24,4 +24,8 @@
</style>
<color name="loading">#ffc400</color>
+
+ <color name="separator">#353535</color>
+ <color name="separator_focused">#757575</color>
+ <color name="separator_pressed">@color/separator_focused</color>
</resources>