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 --- .../rssin/android/NavigationDrawerFragment.java | 9 ++++-- .../NavigationDrawerManageFiltersFragment.java | 37 +++++++++++----------- 2 files changed, 26 insertions(+), 20 deletions(-) (limited to 'app/src/main/java/org') 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)); -- cgit v1.2.3