aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSize432015-06-10 13:00:11 +0200
committerSize432015-06-10 13:00:11 +0200
commited6446af455fe0749fabd0b39f1e2c1b25623e06 (patch)
tree0dd0cfe3a67ffd587f93f86c0b05218bf9ffb815 /app
parentAdded icons, changed filter title edittext to singleline, fixed feed settings... (diff)
Aligned (EDIT) to the right
Diffstat (limited to 'app')
-rwxr-xr-xapp/src/main/java/org/rssin/android/NavigationDrawerAdapter.java24
-rwxr-xr-xapp/src/main/res/layout/separator_navigation_drawer.xml16
-rwxr-xr-xapp/src/main/res/values/strings.xml5
3 files changed, 33 insertions, 12 deletions
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"
>
- <LinearLayout
+ <RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:minHeight="35dp"
@@ -24,7 +24,19 @@ android:background="#252525"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#FFFFFF"
/>
- </LinearLayout>
+
+ <TextView
+ android:id="@+id/separator_navigation_drawer_edit"
+ android:layout_alignParentRight="true"
+ android:layout_gravity="right"
+ android:layout_marginRight="8dp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="4dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="#FFFFFF"
+ />
+ </RelativeLayout>
<View
android:layout_width="match_parent"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index df130b3..4696d0f 100755
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -67,12 +67,13 @@
<string name="article_published_on_unknown"/>
<string name="navigation_drawer_all_feeds">All feeds</string>
<string name="navigation_drawer_start">START</string>
- <string name="navigation_drawer_edit_filters">FILTERS (EDIT)</string>
- <string name="navigation_drawer_edit_feeds">FEEDS (EDIT)</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>
</resources>