Skip to content

Instantly share code, notes, and snippets.

@ciscorucinski
Last active August 29, 2015 14:27
Show Gist options
  • Save ciscorucinski/323950d75a3dff17c004 to your computer and use it in GitHub Desktop.
Save ciscorucinski/323950d75a3dff17c004 to your computer and use it in GitHub Desktop.
1
public class OverviewViewHolder extends BaseViewHolder {
public TextView txtPrimaryText;
@Override
public View getPrimaryView() { return txtPrimaryText; }
public OverviewViewHolder(View itemView, int position, boolean isMissing) {
super(itemView, position, isMissing);
if (isMissing) {
root.setHasStringExtra(true);
root.setSecondaryExtraText("Not Available");
} else {
txtPrimaryText = new TextView(context, null, android.R.attr.textAppearanceSmall);
txtPrimaryText.setTextColor(Color.BLACK);
getPrimaryViewLayout().addView(txtPrimaryText);
txtPrimaryText.setText(movie.getOverview());
}
root.setSecondaryText("Overview");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment