diff options
author | datavizard <44409076+datavizard@users.noreply.github.com> | 2021-03-10 18:00:45 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 13:30:45 +0100 |
commit | b276c349423335c23807b9f61f0a78c0de2b3104 (patch) | |
tree | 811faa3e3afc263c19e37373ef2a146b8e76639f | |
parent | 57e5784e6f17f591641f43659148cfeb627ccbc5 (diff) | |
download | AntennaPod-b276c349423335c23807b9f61f0a78c0de2b3104.zip |
Adds a visual cue to the podcast header view whenever updates are disabled (#5014)
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/feeditemlist_header.xml | 11 | ||||
-rw-r--r-- | core/src/main/res/values/strings.xml | 1 |
3 files changed, 21 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java index acb929dd2..7a363bcc1 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java @@ -100,6 +100,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem private ImageView imgvCover; private TextView txtvInformation; private TextView txtvAuthor; + private TextView txtvUpdatesDisabled; private ImageButton butShowInfo; private ImageButton butShowSettings; private View header; @@ -166,6 +167,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem butShowSettings = root.findViewById(R.id.butShowSettings); txtvInformation = root.findViewById(R.id.txtvInformation); txtvFailure = root.findViewById(R.id.txtvFailure); + txtvUpdatesDisabled = root.findViewById(R.id.txtvUpdatesDisabled); header = root.findViewById(R.id.headerContainer); AppBarLayout appBar = root.findViewById(R.id.appBar); CollapsingToolbarLayout collapsingToolbar = root.findViewById(R.id.collapsing_toolbar); @@ -456,6 +458,13 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem } else { txtvFailure.setVisibility(View.GONE); } + if (!feed.getPreferences().getKeepUpdated()) { + txtvUpdatesDisabled.setText("{md-pause-circle-outline} " + this.getString(R.string.updates_disabled_label)); + Iconify.addIcons(txtvUpdatesDisabled); + txtvUpdatesDisabled.setVisibility(View.VISIBLE); + } else { + txtvUpdatesDisabled.setVisibility(View.GONE); + } txtvTitle.setText(feed.getTitle()); txtvAuthor.setText(feed.getAuthor()); if (feed.getItemFilter() != null) { diff --git a/app/src/main/res/layout/feeditemlist_header.xml b/app/src/main/res/layout/feeditemlist_header.xml index 2b59845f7..540baf4a7 100644 --- a/app/src/main/res/layout/feeditemlist_header.xml +++ b/app/src/main/res/layout/feeditemlist_header.xml @@ -117,4 +117,15 @@ android:gravity="center" tools:visibility="visible" tools:text="(i) Information"/> + + <TextView + android:id="@+id/txtvUpdatesDisabled" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="2dp" + android:background="?android:attr/windowBackground" + android:visibility="gone" + android:gravity="center" + tools:visibility="visible" + tools:text="Updates disabled"/> </LinearLayout> diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index baa2662fb..83b87faee 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -182,6 +182,7 @@ <string name="refresh_failed_msg">{fa-exclamation-circle} Last Refresh failed. Tap to view details.</string> <string name="open_podcast">Open Podcast</string> <string name="please_wait_for_data">Please wait until the data is loaded</string> + <string name="updates_disabled_label">Updates disabled</string> <!-- actions on feeditems --> <string name="download_label">Download</string> |