diff options
Diffstat (limited to 'src/com/android/tv/dvr/ui/browse/DetailsContentPresenter.java')
-rw-r--r-- | src/com/android/tv/dvr/ui/browse/DetailsContentPresenter.java | 8 |
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( |