Hi Experts,

i am having out of memory exception at image_view.setImageURI(Uri.parse
(imageFile));

it is working fine as long as i keep the same orientation, but when i
change the orientation, it gives me exception.


i am passing imageFile from calling activity as string.

here is a piece of my code:


 loadSelectedImage(); // calling this in onCreate


public void loadSelectedImage(){

         Bundle extras = getIntent().getExtras();
            if(extras !=null)
            {

            imageFile= extras.getString("image");

            if(imageFile != null){
            image= Uri.parse(imageFile);
            imageicon.setImageURI(image);

            }

            }


i also tried additional code below to set image when orientation
change but same exception

 @Override
  public void onRestoreInstanceState(Bundle savedInstanceState) {



          imageicon.setImageURI(Uri.parse(imageFile));

  }


any solution
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to