aboutsummaryrefslogtreecommitdiff
path: root/src/com/android/tv/dvr/ui/browse/DetailsContentPresenter.java
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2019-07-01 21:00:07 +0000
committerXin Li <delphij@google.com>2019-07-01 21:00:07 +0000
commiteffbc99d77bb465246a80f96b2c0128885783f0b (patch)
treef4ba89447e2d7ac3355508e583a5cf0574c29af5 /src/com/android/tv/dvr/ui/browse/DetailsContentPresenter.java
parentc8b794291c5b8b5be03d740355ab33f2df79a76e (diff)
parentd12bfa398c56027290a9e6e4fd14f635458ec581 (diff)
downloadTV-temp_140451723.tar.gz
DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-mastertemp_140451723
Bug: 134405016 Change-Id: If83c4123ed715e08bc37b8f5772adc84e86298af
Diffstat (limited to 'src/com/android/tv/dvr/ui/browse/DetailsContentPresenter.java')
-rw-r--r--src/com/android/tv/dvr/ui/browse/DetailsContentPresenter.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/tv/dvr/ui/browse/DetailsContentPresenter.java b/src/com/android/tv/dvr/ui/browse/DetailsContentPresenter.java
index aec8c411..6b5fd1fd 100644
--- a/src/com/android/tv/dvr/ui/browse/DetailsContentPresenter.java
+++ b/src/com/android/tv/dvr/ui/browse/DetailsContentPresenter.java
@@ -45,12 +45,13 @@ import com.android.tv.util.Utils;
* The latter class are re-used to provide a customized version of {@link
* android.support.v17.leanback.widget.DetailsOverviewRow}.
*/
-class DetailsContentPresenter extends Presenter {
+public class DetailsContentPresenter extends Presenter {
/** The ViewHolder for the {@link DetailsContentPresenter}. */
public static class ViewHolder extends Presenter.ViewHolder {
final TextView mTitle;
final TextView mSubtitle;
final LinearLayout mDescriptionContainer;
+ final LinearLayout mErrorMessage;
final TextView mBody;
final TextView mReadMoreView;
final int mTitleMargin;
@@ -150,6 +151,8 @@ class DetailsContentPresenter extends Presenter {
});
mTitle = (TextView) view.findViewById(R.id.dvr_details_description_title);
mSubtitle = (TextView) view.findViewById(R.id.dvr_details_description_subtitle);
+ mErrorMessage =
+ (LinearLayout) view.findViewById(R.id.dvr_details_description_error_message);
mBody = (TextView) view.findViewById(R.id.dvr_details_description_body);
mDescriptionContainer =
(LinearLayout) view.findViewById(R.id.dvr_details_description_container);
@@ -321,6 +324,9 @@ class DetailsContentPresenter extends Presenter {
if (TextUtils.isEmpty(detailsContent.getDescription())) {
vh.mBody.setVisibility(View.GONE);
} else {
+ if (detailsContent.shouldShowErrorMessage()) {
+ vh.mErrorMessage.setVisibility(View.VISIBLE);
+ }
vh.mBody.setText(detailsContent.getDescription());
vh.mBody.setVisibility(View.VISIBLE);
vh.mBody.setLineSpacing(