Skip to content

Instantly share code, notes, and snippets.

@ciscorucinski
Last active August 29, 2015 14:27
Show Gist options
  • Save ciscorucinski/02b8ba7ca519cd894ed7 to your computer and use it in GitHub Desktop.
Save ciscorucinski/02b8ba7ca519cd894ed7 to your computer and use it in GitHub Desktop.
2
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