How can I disable onCreate event when I turn my device from portrait orientation? Because when application starts it will get much of its data from the Internet, and it will be bad to download this data every time the user turns his device.
In Activity tag of manifest write
android:configChanges="orientation|screenSize"
example:
<activity android:name=".MainActivity"
android:configChanges="orientation|screenSize">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With