From my main activity, I would like to pass a ImageView to the constructor of another class, or the object of this class if you like. Some codesnippets beneath.
The class case:
public class Case {
String id;
int status;
Date date;
ImageView orginalFace;
ImageView profilePicture;
public Case(String id, int status, Date date, ImageView orginalFace, ImageView profilePicture) {
this.id= id;
this.status = status;
this.date = date;
this.orginalFace= orginalFace;
this.profilePicture= profilePicture;
}
}
And this is where I try to add an ImageView:
ArrayList<Case> cases = new ArrayList<Case>();
Case case1 = new Case("991176565809", 1, new Date(), R.drawable.face, R.drawable.profile);
I am aware of that when I try to add R.drawable.face and R.drawable.profile this is just integers. How can i manage to do this correctly?
You can load the two ImageViews like this: