小编Ric*_*rez的帖子

如何在活动之间传递ArrayList <Bitmap>

我有一个ArrayList<Bitmap>使用该方法填充的,getBitmapFromAsset()并希望使用Bundle通过intent传递它.但是它允许我传递其他ArrayLists,如ArrayList<String>:

Intent intent = new Intent(myClass.this, Rclass.class);  
Bundle bundle = new Bundle();    
bundle.putStringArrayList("names", (ArrayList<String>) names);  
intent.putExtras(bundle);
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)

但我不知道如何传递Bitmap类型的ArrayList,因为我在Bundle中没有看到该选项.有关如何执行此操作的任何想法?

android arraylist

2
推荐指数
1
解决办法
5299
查看次数

标签 统计

android ×1

arraylist ×1