From ed23c6c7801d34b4e5e3348dc0fb47b05fcc7c92 Mon Sep 17 00:00:00 2001
From: Camil Staps
Date: Wed, 10 Jun 2015 21:04:46 +0200
Subject: Several minor fixes
---
README.md | 4 ---
.../rssin/android/NavigationDrawerFragment.java | 9 ++++--
.../NavigationDrawerManageFiltersFragment.java | 37 +++++++++++-----------
app/src/main/res/drawable/separator.xml | 9 ++++++
app/src/main/res/layout/item_navigation_drawer.xml | 2 +-
.../res/layout/separator_navigation_drawer.xml | 35 ++++++++++----------
app/src/main/res/values/strings.xml | 8 ++---
app/src/main/res/values/styles.xml | 4 +++
8 files changed, 61 insertions(+), 47 deletions(-)
create mode 100644 app/src/main/res/drawable/separator.xml
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 @@
+
+
+
+
+
+
+
+
\ 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.
-->
+ 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">
+ android:background="@drawable/separator">
+ android:textSize="@dimen/font_size_small"/>
+ android:textSize="@dimen/font_size_small"/>
+
+ android:background="#DADADC"/>
\ 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 @@
Image 5 resource.
Skip tutorial
All feeds
- START
- FILTERS
- FEEDS
+ Start
+ Filters
+ Feeds
Feedback saved.
Add feed
URL:
Title
New title:
Share
- (EDIT)
+ EDIT
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 @@
#ffc400
+
+ #353535
+ #757575
+ @color/separator_focused
--
cgit v1.2.3