How to disable onCreate action when will orientation be changed?

user1023177 :

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.

Shailendra Singh Rajawat :

In Activity tag of manifest write

android:configChanges="orientation|screenSize"

example:

<activity android:name=".MainActivity"
            android:configChanges="orientation|screenSize">

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to add scrolling to the view when screen orientation is changed to landscape?

How do I disable orientation change on Android?

How can I disable landscape orientation?

What Activity's lifecycle callbacks are executed when Android orientation is changed?

How to lock the orientation to Portrait when using intent ACTION_IMAGE_CAPTURE?

How can we perform an action when as switch is changed in a TableView List?

Fragment not using landscape layout when orientation is changed

How to set a variable to false when ipad orientation is changed from landscape to portrait and vice versa using javascript and react?

Disable keyboard when UITextfield is changed

How to save state of searchView when orientation is changed

Flutter: how to disable device orientation changes?

Redraw CoreGraphics drawing when device orientation changed

Save recording when orientation was changed in android

How to disable the screen orientation hotkeys in Windows (XP)?

Map behavior changes when changed to landscape orientation using fragments

Android: backbutton animation when orientation is changed

Bug in Action Bar tabs when changing orientation

How to save camera instance at run-time while taking video when screen orientation get changed

How to Move Object when device orientation get changed?

Realoding when screen orientation changed

How to disable or override the oncreate method in Android

Autolayout constraint issue when device orientation gets changed

how to disable the automatic focus on jqGrid row when it is changed to edit mode

Tableview embedded in a container view resets data when orientation is changed

Map becomes black for half second when screen orientation changed

When Orientation is changed effects are not applied (swift3)

How to disable paging of UIPageViewController only for landscape orientation?

How to disable right click action when using QRubberBand?

How to run github action only when a specific file is changed