diff options
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/FeedInfoActivity.java | 25 | ||||
-rw-r--r-- | app/src/main/res/layout/feedinfo.xml | 11 |
2 files changed, 25 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..edb973a0c 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 cbxKeepUpdated; 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); + cbxKeepUpdated = (CheckBox) findViewById(R.id.cbxKeepUpdated); spnAutoDelete = (Spinner) findViewById(R.id.spnAutoDelete); etxtUsername = (EditText) findViewById(R.id.etxtUsername); etxtPassword = (EditText) findViewById(R.id.etxtPassword); @@ -168,16 +169,18 @@ 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(); + }); + cbxKeepUpdated.setChecked(prefs.getKeepUpdated()); + cbxKeepUpdated.setOnCheckedChangeListener((compoundButton, checked) -> { + feed.getPreferences().setKeepUpdated(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..4b545e3cc 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/cbxKeepUpdated" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="@string/keep_updated" + android:enabled="true" + android:textColor="?android:attr/textColorPrimary" + tools:background="@android:color/holo_red_light" + android:checked="true" /> + <TextView android:id="@+id/txtvAuthentication" android:layout_width="match_parent" |