如何通过与arraylist相同的意图将包含可绘制图像的整数数组列表从活动传递到活动
int[] imageId = {R.drawable.image, R.drawable.image, R.drawable.image,R.drawable.image, R.drawable.image};
答案 0 :(得分:0)
当前活动
Intent myIntent = new Intent(current.this, New.class);
myIntent.putExtra("images", imageId);
startActivity(myIntent);
<强> New.class 强>
Bundle b = getIntent().getExtras();
if(b!=null)
{
ArrayList<Integer> arr = (ArrayList<Integer>)b.getIntegerArrayListExtra("images");
}