Jutikorn Jutikorn - 1 year ago 163
Android Question

Android onCreate() Method called twice when device rotated. (ICS)

I'm developing on an android tablet application and I have to manage application orientation. I got a problem that every time when I rotate the device onCreate() will be called.

I fixed this problem on Honeycomb (3.1) by set this line in Manifest.xml file at the activity tag and it works well.


But this problem came back again when I test my app on ICS Tablet. Does anyone know how to fix this problem?



Answer Source

If you are targeting an API level > 13 you have to add the screenSize flag as reported in the doc:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download