Skip to content

Instantly share code, notes, and snippets.

@janishar
Created October 10, 2016 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janishar/59c7778f8d21d9ea45be985191272a79 to your computer and use it in GitHub Desktop.
Save janishar/59c7778f8d21d9ea45be985191272a79 to your computer and use it in GitHub Desktop.
@Layout(R.layout.load_more_item_view)
public class ItemView {
@View(R.id.titleTxt)
private TextView titleTxt;
@View(R.id.captionTxt)
private TextView captionTxt;
@View(R.id.timeTxt)
private TextView timeTxt;
@View(R.id.imageView)
private ImageView imageView;
private InfiniteFeedInfo mInfo;
private Context mContext;
public ItemView(Context context, InfiniteFeedInfo info) {
mContext = context;
mInfo = info;
}
@Resolve
private void onResolved() {
titleTxt.setText(mInfo.getTitle());
captionTxt.setText(mInfo.getCaption());
timeTxt.setText(mInfo.getTime());
Glide.with(mContext).load(mInfo.getImageUrl()).into(imageView);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment