我在ActivityA中有位圖我想將位圖從這裏傳遞給ActivityB,我爲此進行了搜索。當我使用這個如何將位圖從一個活動傳遞到另一個
Intent intent = new Intent(this, NewActivity.class);
intent.putExtra("BitmapImage", bitmap);
用於獲取
Bitmap bitmap = (Bitmap) intent.getParcelableExtra("BitmapImage");
我收到此錯誤!失敗的粘合劑交易!!!。 我該如何解決這個問題。
你的意思是「有時有效,但不是所有的時間」?你在屏幕上看到了哪些效果(或者如果你遇到錯誤,在logcat中)? –
檢查我的答案編輯答案你也可以使用Application類。 –
這將有助於http:// stackoverflow。com/questions/13577664/pass-a-bitmap-image-from-one-activity-to-another – manish