diff options
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/FeedInfoActivity.java | 26 | ||||
-rw-r--r-- | app/src/main/res/layout/feedinfo.xml | 11 |
2 files changed, 26 insertions, 11 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 dedc3d9fd..3679b5eca 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/FeedInfoActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/FeedInfoActivity.java @@ -18,7 +18,6 @@ import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemSelectedListener; import android.widget.CheckBox; -import android.widget.CompoundButton; import android.widget.EditText; import android.widget.ImageView; import android.widget.RadioButton; @@ -67,6 +66,7 @@ public class FeedInfoActivity extends ActionBarActivity { private RadioButton rdoFilterInclude; private RadioButton rdoFilterExclude; private CheckBox cbxAutoDownload; + private CheckBox cbxGlobalRefresh; private Spinner spnAutoDelete; private boolean filterInclude = true; @@ -106,6 +106,7 @@ public class FeedInfoActivity extends ActionBarActivity { txtvAuthor = (TextView) findViewById(R.id.txtvAuthor); txtvUrl = (TextView) findViewById(R.id.txtvUrl); cbxAutoDownload = (CheckBox) findViewById(R.id.cbxAutoDownload); + cbxGlobalRefresh = (CheckBox) findViewById(R.id.cbxGlobalRefresh); spnAutoDelete = (Spinner) findViewById(R.id.spnAutoDelete); etxtUsername = (EditText) findViewById(R.id.etxtUsername); etxtPassword = (EditText) findViewById(R.id.etxtPassword); @@ -168,16 +169,19 @@ public class FeedInfoActivity extends ActionBarActivity { cbxAutoDownload.setEnabled(UserPreferences.isEnableAutodownload()); cbxAutoDownload.setChecked(prefs.getAutoDownload()); - cbxAutoDownload.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { - @Override - 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(); - } + cbxAutoDownload.setOnCheckedChangeListener((compoundButton, checked) -> { + feed.getPreferences().setAutoDownload(checked); + feed.savePreferences(FeedInfoActivity.this); + updateAutoDownloadSettings(); + ApplyToEpisodesDialog dialog = new ApplyToEpisodesDialog(FeedInfoActivity.this, + feed, checked); + dialog.createNewDialog().show(); + }); + cbxGlobalRefresh.setEnabled(true); + cbxGlobalRefresh.setChecked(prefs.getGlobalRefresh()); + cbxGlobalRefresh.setOnCheckedChangeListener((compoundButton, checked) -> { + feed.getPreferences().setGlobalRefresh(checked); + feed.savePreferences(FeedInfoActivity.this); }); spnAutoDelete.setOnItemSelectedListener(new OnItemSelectedListener() { @Override diff --git a/app/src/main/res/layout/feedinfo.xml b/app/src/main/res/layout/feedinfo.xml index efc367c8b..37f6e1b42 100644 --- a/app/src/main/res/layout/feedinfo.xml +++ b/app/src/main/res/layout/feedinfo.xml @@ -181,6 +181,17 @@ android:clickable="true" /> </android.support.v7.widget.GridLayout> + <CheckBox + android:id="@+id/cbxGlobalRefresh" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="@string/global_refresh" + android:enabled="false" + android:textColor="?android:attr/textColorPrimary" + tools:background="@android:color/holo_red_light" + android:checked="false" /> + <TextView android:id="@+id/txtvAuthentication" android:layout_width="match_parent" |