Reputation: 593
I want to do initialization when activity starts.
I can put it in onCreate
method, but it is called every time screenOrientation
is changed.
I can disable this in AndroidManifest
, but maybe there is better solution for this?
Upvotes: 0
Views: 1041
Reputation: 75629
Please read this article about activities, including orientation change handling. In general reading about activity life cycle would also help you.
Upvotes: 2