Created
October 10, 2016 10:51
-
-
Save janishar/59c7778f8d21d9ea45be985191272a79 to your computer and use it in GitHub Desktop.
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
@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