Created
February 15, 2015 11:14
-
-
Save mzgreen/02359283cb0827e62ed0 to your computer and use it in GitHub Desktop.
HideOnScrollExample - RecyclerItemViewHolder class
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 RecyclerItemViewHolder extends RecyclerView.ViewHolder { | |
private final TextView mItemTextView; | |
public RecyclerItemViewHolder(final View parent, TextView itemTextView) { | |
super(parent); | |
mItemTextView = itemTextView; | |
} | |
public static RecyclerItemViewHolder newInstance(View parent) { | |
TextView itemTextView = (TextView) parent.findViewById(R.id.itemTextView); | |
return new RecyclerItemViewHolder(parent, itemTextView); | |
} | |
public void setItemText(CharSequence text) { | |
mItemTextView.setText(text); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment