Created
August 24, 2016 20:38
-
-
Save janishar/e12e0afdbe4f7a799726c8714be4ccf5 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.feed_item) | |
public class InfoView { | |
@ParentPosition | |
private int mParentPosition; | |
@ChildPosition | |
private int mChildPosition; | |
@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 Info mInfo; | |
private Context mContext; | |
public InfoView(Context context, Info 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