Android orientation changing exceptions
I'm having a hard time with the screen orientation in android. I have an activity which captures a signature after the user draws his signature on the device. And for that activity i am passing a parceable object and i get it in oncreate. when the activity changes the orientation sometimes the activity cannot get the parceable object and gives an exception. I tried using a static object for the parceable object but no use. i tried onsaveinstance state method and onRetainNonConfigurationInstance methods as well. 
<code>
	@Override
    protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.signature_capture_view);
	Bundle bundle = getIntent().getExtras(); 
	info = bundle.getParcelable("info");
	logo= (Bitmap) bundle.get("logo");
	}
</code>

And my save instance state method is like this;

<code>

    @Override
     protected void onSaveInstanceState(Bundle outState) {
     outState.putParcelable("info", info);
     super.onSaveInstanceState(outState);
     }
</code>

From the onconfiguration changed method i call the setcontentview method to set a fresh layout. 
<code>

 @Override
    public void onConfigurationChanged(Configuration newConfig) {
        setContentView(R.layout.signature_capture_view);
        super.onConfigurationChanged(newConfig);
		}
</code>

Sometimes when the orientation changes an out of memory exception occurs from the setcontentview method. 

Any help would be greatly appreciated. Thanks in advance. 


Android orientation changing exceptions
===

I'm having a hard time with the screen orientation in android. I have an activity which captures a signature after the user draws his signature on the device. And for that activity i am passing a parceable object and i get it in oncreate. when the activity changes the orientation sometimes the activity cannot get the parceable object and gives an exception. I tried using a static object for the parceable object but no use. i tried onsaveinstance state method and onRetainNonConfigurationInstance methods as well. 
<code>
	@Override
    protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.signature_capture_view);
	Bundle bundle = getIntent().getExtras(); 
	info = bundle.getParcelable("info");
	logo= (Bitmap) bundle.get("logo");
	}
</code>

And my save instance state method is like this;

<code>

    @Override
     protected void onSaveInstanceState(Bundle outState) {
     outState.putParcelable("info", info);
     super.onSaveInstanceState(outState);
     }
</code>

From the onconfiguration changed method i call the setcontentview method to set a fresh layout. 
<code>

 @Override
    public void onConfigurationChanged(Configuration newConfig) {
        setContentView(R.layout.signature_capture_view);
        super.onConfigurationChanged(newConfig);
		}
</code>

Sometimes when the orientation changes an out of memory exception occurs from the setcontentview method. 

Any help would be greatly appreciated. Thanks in advance. 

