From ed6446af455fe0749fabd0b39f1e2c1b25623e06 Mon Sep 17 00:00:00 2001
From: Size43
Date: Wed, 10 Jun 2015 13:00:11 +0200
Subject: Aligned (EDIT) to the right
---
README.md | 3 +--
.../org/rssin/android/NavigationDrawerAdapter.java | 24 ++++++++++++++--------
.../res/layout/separator_navigation_drawer.xml | 16 +++++++++++++--
app/src/main/res/values/strings.xml | 5 +++--
4 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md
index c6fc667..b31a843 100644
--- a/README.md
+++ b/README.md
@@ -8,13 +8,12 @@ Copyright © 2015 Randy Wanga, Jos Craaijo, Joep Bernards, Camil Staps. All
(see also the @todo markings throughout the source code)
## High priority
-* Test deleting feeds
-* Titles & alignment "edit"
## Normal priority
* Background sync & notifications
* Add tutorial (e.g.: at first startup, walk user through creating first filter)
* Swipe left & right for (dis)like
+* Extract feed title from feed
## Low priority
* Readability plugin to view whole article
diff --git a/app/src/main/java/org/rssin/android/NavigationDrawerAdapter.java b/app/src/main/java/org/rssin/android/NavigationDrawerAdapter.java
index 8f0a068..973f7ab 100755
--- a/app/src/main/java/org/rssin/android/NavigationDrawerAdapter.java
+++ b/app/src/main/java/org/rssin/android/NavigationDrawerAdapter.java
@@ -33,16 +33,16 @@ class NavigationDrawerAdapter implements ListAdapter {
public void updateMenu(Context context) throws IOException {
menuItems.clear();
- menuItems.add(new MenuSection(context.getString(R.string.navigation_drawer_start)));
+ menuItems.add(new MenuSection(context.getString(R.string.navigation_drawer_start), ""));
menuItems.add(new MenuUnifiedInbox(context));
- menuItems.add(new ManageFiltersSection(context.getString(R.string.navigation_drawer_edit_filters)));
+ menuItems.add(new ManageFiltersSection(context.getString(R.string.navigation_drawer_edit_filters), context.getString(R.string.navigation_drawer_edit_text)));
for(Filter f : FiltersList.getInstance(context).getFilters())
{
menuItems.add(new MenuFilterItem(f));
}
- menuItems.add(new ManageFeedsSection(context.getString(R.string.navigation_drawer_edit_feeds)));
+ menuItems.add(new ManageFeedsSection(context.getString(R.string.navigation_drawer_edit_feeds), context.getString(R.string.navigation_drawer_edit_text)));
for(Feed f : FeedsList.getInstance(context).getFeeds())
{
@@ -117,6 +117,7 @@ class NavigationDrawerAdapter implements ListAdapter {
if (type == ITEM_VIEW_TYPE_SEPARATOR) {
final MenuSection section = (MenuSection) getItem(position);
((TextView) convertView.findViewById(R.id.separator_navigation_drawer_text)).setText(section.getText());
+ ((TextView) convertView.findViewById(R.id.separator_navigation_drawer_edit)).setText(section.getRightText());
} else {
final MenuItem video = (MenuItem) getItem(position);
((TextView) convertView.findViewById(R.id.item_navigation_drawer_text)).setText(video.getText());
@@ -261,22 +262,29 @@ class NavigationDrawerAdapter implements ListAdapter {
class MenuSection extends MenuItem
{
- public MenuSection(String text)
+ private String rightText;
+
+ public MenuSection(String text, String rightText)
{
super(text);
+ this.rightText = rightText;
}
@Override
public int getItemViewType() {
return ITEM_VIEW_TYPE_SEPARATOR;
}
+
+ public String getRightText() {
+ return rightText;
+ }
}
class ManageFiltersSection extends MenuSection
{
- public ManageFiltersSection(String text)
+ public ManageFiltersSection(String text, String rightText)
{
- super(text);
+ super(text, rightText);
}
@Override
@@ -292,9 +300,9 @@ class NavigationDrawerAdapter implements ListAdapter {
class ManageFeedsSection extends MenuSection
{
- public ManageFeedsSection(String text)
+ public ManageFeedsSection(String text, String rightText)
{
- super(text);
+ super(text, rightText);
}
@Override
diff --git a/app/src/main/res/layout/separator_navigation_drawer.xml b/app/src/main/res/layout/separator_navigation_drawer.xml
index 81a9d0a..a3031a0 100755
--- a/app/src/main/res/layout/separator_navigation_drawer.xml
+++ b/app/src/main/res/layout/separator_navigation_drawer.xml
@@ -10,7 +10,7 @@ android:layout_marginTop="0dp"
android:background="#252525"
>
-
-
+
+
+
All feeds
START
- FILTERS (EDIT)
- FEEDS (EDIT)
+ FILTERS
+ FEEDS
Feedback saved.
Add feed
URL:
Title
New title:
Share
+ (EDIT)
--
cgit v1.2.3