Skip to content

Instantly share code, notes, and snippets.

@janishar
Created August 23, 2016 07:01
Show Gist options
  • Select an option

  • Save janishar/dbdc3836937cdaa77df0459bd7274241 to your computer and use it in GitHub Desktop.

Select an option

Save janishar/dbdc3836937cdaa77df0459bd7274241 to your computer and use it in GitHub Desktop.
@Animate(Animation.CARD_LEFT_IN_DESC)
@NonReusable
@Layout(R.layout.gallery_item)
public class GalleryItem {
@View(R.id.imageView)
private ImageView imageView;
private Drawable mDrawable;
public GalleryItem(Drawable drawable) {
mDrawable = drawable;
}
@Resolve
private void onResolved() {
imageView.setImageDrawable(mDrawable);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment