I know there are similar questions out there, but i could never understand the solution.
I want to pass on 4 drawables
out of the local variables of my Activity
:
public class MainActivity extends AppCompatActivity {
private Drawable picture1;
private Drawable picture2;
private Drawable picture3;
private Drawable picture4;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void select(View view){
SelectActivity temp = new SelectActivity();
Intent i = new Intent(this, SelectActivity.class);
//some Extras, that dont work because you can't send drawables
startActivity(i);
}
//...
Basically, I would like to just get the ID and put that in the extras or similar, because all the files are in my res folder. But those four pictures are pictures used in ImageButtons
and when I click one of them I need all 4 pictures and an integer of which one was clicked (I already figured that out).
I'm new to Android stuff and I can't figure out how to do that. I'd appreciate a good explanation. Thank you in Advance