I have an Activity on my app that has to save some data, and that data has to be accesed from other Activity, so i´m using SharedPreferences to do this, the problem is that, when i try to save the bitmap of an ImageView with:
ImageButton imgView = (ImageButton) findViewById(R.id.UserImageButton);
Bitmap bitmap = ((BitmapDrawable)imgView.getDrawable()).getBitmap();
editor.putInt("bitmap", bitmap);
Or directly with:
ImageButton imgView = (ImageButton) findViewById(R.id.UserImageButton);;
editor.putInt("bitmap", ((BitmapDrawable)imgView.getDrawable()).getBitmap());
But it doesn´t work. How can I save it?? Thanks a lot