Adds a visual cue to the podcast header view whenever updates are disabled (#5014)
This commit is contained in:
parent
57e5784e6f
commit
b276c34942
|
@ -100,6 +100,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
|
||||||
private ImageView imgvCover;
|
private ImageView imgvCover;
|
||||||
private TextView txtvInformation;
|
private TextView txtvInformation;
|
||||||
private TextView txtvAuthor;
|
private TextView txtvAuthor;
|
||||||
|
private TextView txtvUpdatesDisabled;
|
||||||
private ImageButton butShowInfo;
|
private ImageButton butShowInfo;
|
||||||
private ImageButton butShowSettings;
|
private ImageButton butShowSettings;
|
||||||
private View header;
|
private View header;
|
||||||
|
@ -166,6 +167,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
|
||||||
butShowSettings = root.findViewById(R.id.butShowSettings);
|
butShowSettings = root.findViewById(R.id.butShowSettings);
|
||||||
txtvInformation = root.findViewById(R.id.txtvInformation);
|
txtvInformation = root.findViewById(R.id.txtvInformation);
|
||||||
txtvFailure = root.findViewById(R.id.txtvFailure);
|
txtvFailure = root.findViewById(R.id.txtvFailure);
|
||||||
|
txtvUpdatesDisabled = root.findViewById(R.id.txtvUpdatesDisabled);
|
||||||
header = root.findViewById(R.id.headerContainer);
|
header = root.findViewById(R.id.headerContainer);
|
||||||
AppBarLayout appBar = root.findViewById(R.id.appBar);
|
AppBarLayout appBar = root.findViewById(R.id.appBar);
|
||||||
CollapsingToolbarLayout collapsingToolbar = root.findViewById(R.id.collapsing_toolbar);
|
CollapsingToolbarLayout collapsingToolbar = root.findViewById(R.id.collapsing_toolbar);
|
||||||
|
@ -456,6 +458,13 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
|
||||||
} else {
|
} else {
|
||||||
txtvFailure.setVisibility(View.GONE);
|
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());
|
txtvTitle.setText(feed.getTitle());
|
||||||
txtvAuthor.setText(feed.getAuthor());
|
txtvAuthor.setText(feed.getAuthor());
|
||||||
if (feed.getItemFilter() != null) {
|
if (feed.getItemFilter() != null) {
|
||||||
|
|
|
@ -117,4 +117,15 @@
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
tools:visibility="visible"
|
tools:visibility="visible"
|
||||||
tools:text="(i) Information"/>
|
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>
|
</LinearLayout>
|
||||||
|
|
|
@ -182,6 +182,7 @@
|
||||||
<string name="refresh_failed_msg">{fa-exclamation-circle} Last Refresh failed. Tap to view details.</string>
|
<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="open_podcast">Open Podcast</string>
|
||||||
<string name="please_wait_for_data">Please wait until the data is loaded</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 -->
|
<!-- actions on feeditems -->
|
||||||
<string name="download_label">Download</string>
|
<string name="download_label">Download</string>
|
||||||
|
|
Loading…
Reference in New Issue