Last active
August 29, 2015 14:27
-
-
Save ciscorucinski/02b8ba7ca519cd894ed7 to your computer and use it in GitHub Desktop.
2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OverviewViewHolder extends BaseViewHolder { | |
DocumentView documentView; | |
@Override | |
public View getPrimaryView() { return documentView; } | |
public OverviewViewHolder(View itemView, int position, boolean isMissing) { | |
super(itemView, position, isMissing); | |
if (isMissing) { | |
root.setHasStringExtra(true); | |
root.setSecondaryExtraText("Not Available"); | |
} else { | |
DocumentView documentView = new DocumentView(context, DocumentView.FORMATTED_TEXT); | |
getPrimaryViewLayout().addView(documentView); | |
IDocumentLayout.LayoutParams params = documentView.getDocumentLayoutParams(); | |
params.setTextTypeface(Typeface.DEFAULT); // Not important to issue | |
params.setAntialias(true); // Not important to issue | |
params.setTextAlignment(TextAlignment.JUSTIFIED); | |
documentView.setCacheConfig(DocumentView.CacheConfig.GRAYSCALE); // Not important to issue | |
documentView.setText(movie.getOverview()); | |
} | |
root.setSecondaryText("Overview"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment