How can I send image res to another Activity - How change Resources to integer? i create class to pass Image Resources to another activity:
public class MyImageView extends ImageView implements View.OnClickListener {
Context contxt;
public MyImageView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
setOnClickListener(this);
this.contxt = context;
}
public MyImageView(Context context, AttributeSet attrs) {
super(context, attrs);
setOnClickListener(this);
this.contxt = context;
}
public MyImageView(Context context) {
super(context);
setOnClickListener(this);
this.contxt = context;
}
@Override
public void setOnClickListener(OnClickListener l) {
super.setOnClickListener(l);
}
@Override
public void onClick(View v) {
int g = getResourse......................;(this is my peroblem)
Bundle extras = new Bundle();
extras.putInt("imagebitmap", g);
Intent i = new Intent(contxt, zara.knauf.Img.class);
i.putExtras(extras);
contxt.startActivity(i);
}
}