diff options
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/FeedInfoActivity.java | 12 | ||||
-rw-r--r-- | app/src/main/res/layout/feedinfo.xml | 31 | ||||
-rw-r--r-- | core/src/main/res/values/strings.xml | 3 |
3 files changed, 33 insertions, 13 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/FeedInfoActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/FeedInfoActivity.java index 8b46c934d..dedc3d9fd 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/FeedInfoActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/FeedInfoActivity.java @@ -173,6 +173,7 @@ public class FeedInfoActivity extends ActionBarActivity { public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { feed.getPreferences().setAutoDownload(checked); feed.savePreferences(FeedInfoActivity.this); + updateAutoDownloadSettings(); ApplyToEpisodesDialog dialog = new ApplyToEpisodesDialog(FeedInfoActivity.this, feed, checked); dialog.createNewDialog().show(); @@ -233,7 +234,7 @@ public class FeedInfoActivity extends ActionBarActivity { etxtFilterText.addTextChangedListener(filterTextWatcher); supportInvalidateOptionsMenu(); - + updateAutoDownloadSettings(); } else { Log.e(TAG, "Activity was started with invalid arguments"); } @@ -349,6 +350,15 @@ public class FeedInfoActivity extends ActionBarActivity { } } + private void updateAutoDownloadSettings() { + if (feed != null && feed.getPreferences() != null) { + boolean enabled = feed.getPreferences().getAutoDownload() && UserPreferences.isEnableAutodownload(); + rdoFilterInclude.setEnabled(enabled); + rdoFilterExclude.setEnabled(enabled); + etxtFilterText.setEnabled(enabled); + } + } + private class ApplyToEpisodesDialog extends ConfirmationDialog { private final Feed feed; diff --git a/app/src/main/res/layout/feedinfo.xml b/app/src/main/res/layout/feedinfo.xml index 2e36bf495..e991c243c 100644 --- a/app/src/main/res/layout/feedinfo.xml +++ b/app/src/main/res/layout/feedinfo.xml @@ -150,17 +150,6 @@ android:text="@string/podcast_settings_label" android:layout_marginTop="8dp"/> - <CheckBox - android:id="@+id/cbxAutoDownload" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:text="@string/auto_download_label" - android:enabled="false" - android:textColor="?android:attr/textColorPrimary" - tools:background="@android:color/holo_red_light" - android:checked="false" /> - <android.support.v7.widget.GridLayout android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -265,6 +254,25 @@ </android.support.v7.widget.GridLayout> + <TextView + android:id="@+id/txtvAutoDownloadSettings" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="@string/auto_download_settings_label" + android:textSize="@dimen/text_size_medium" + android:textColor="?android:attr/textColorPrimary"/> + + <CheckBox + android:id="@+id/cbxAutoDownload" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="@string/auto_download_label" + android:enabled="false" + android:textColor="?android:attr/textColorPrimary" + tools:background="@android:color/holo_red_light" + android:checked="false" /> <TextView android:id="@+id/txtvEpisodeFilters" @@ -285,6 +293,7 @@ android:layout_marginTop="8dp"/> <RadioGroup xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/radio_filter_group" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center" diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 3e0aa6538..717c5e9c3 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -530,8 +530,9 @@ <!-- Feed information screen --> <string name="authentication_label">Authentication</string> <string name="authentication_descr">Change your username and password for this podcast and its episodes.</string> + <string name="auto_download_settings_label">Auto Download Settings</string> <string name="episode_filters_label">Episode Filter</string> - <string name="episode_filters_description">List of terms used to decide if an episode should be included or excluded from being autodownloaded</string> + <string name="episode_filters_description">List of terms used to decide if an episode should be included or excluded when auto downloading</string> <string name="episode_filters_include">Include</string> <string name="episode_filters_exclude">Exclude</string> <string name="episode_filters_hint">Filter text</string> |