Android - Activity Reload on Rotation -


i know duplicate question, , know when device rotated, oncreate method called again, , want keep this; don't want go through steps of overriding onconfigurationchanged or sub-classing application class because android doing reloading in best way (especially on saving current values , status).

however, have commands inside oncreate method don't want execute them if activity reloaded due rotation, there property/method can tell if oncreate triggered due first application start or due orientation change?

for example:
if(< oncreate triggered due orientation > == false)
// execute commands...
else
// nothing...

alternatively, have events in android triggered before oncreate or before onconfigurationchanged?

why not store current orientation in sharedpreferences , compare current orientation stored value in oncreate (and save new orientation sharedpreferences)?

that should provide functionality require, unless i've misunderstood something.


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -