Device lifecycle : rotating the phone causes app problems

Today I will spend most of the time on stabilization. However one of issues is when device is rotated (90 degrees) which causes  loss of the image on a drilldown screen.

Relevant info:

1. Applications that match sensor data to on-screen display must always useandroid.view.Display.getRotation() to map sensor coordinates to screen coordinates

Deep explanation of imaging data with screen ration is but it seems as overkill for me now.

2. Handling configuration changes also seems as overkill

3. this seems a good explanation

<activity android:name=".MyActivity"

Now when one of these configurations change, MyActivity is not restarted. Instead, the Activity receives a call to onConfigurationChanged().

Implemented onConfigurationChanged() but it’s not called. Instead onCreate() is called each time device orientation is changed. Go figure.

4. Found this article with better explanation they say to override OnSaveInstanceState. This makes more sense.  This one is the winner.



4. Friend pointed to this cool software

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s