Realoding when screen orientation changed

lospicos

I have a WebView application, when i change the screen orientation of application it reloads itself.

I am using

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.myapp34"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="7"
        android:targetSdkVersion="19"
        />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>


    <application
        android:allowBackup="true"
        android:icon="@drawable/icon"
        android:label="@string/app_name0"
        android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" >
        <activity
            android:name="com.myapp34.MainActivity"
            android:configChanges="orientation|screenSize"
            android:theme="@style/AppBaseTheme" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.myapp34.AboutUs"
            android:label="@string/title_activity_about_us" >
                <action android:name="android.intent.action.SEND" />
        </activity>
    </application>

</manifest>

I do not want it to reload again. I want that it continues showing normally when I change screen orientation.

lospicos

The problem was on our main activity java and removed

@Override
public void onConfigurationChanged(Configuration newConfig) {
    setContentView(R.layout.activity_main);
    }

Also added

  android:configChanges="orientation|keyboardHidden|keyboard"

to manifest.xml

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?

Map becomes black for half second when screen orientation changed

window.screen.width value not changing in iPad browsers when screen orientation changed

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

Save recording when orientation was changed in android

How to disable onCreate action when will orientation be changed?

Android: backbutton animation when orientation is changed

Fragment not using landscape layout when orientation is changed

How to save state of searchView when orientation is changed

Redraw CoreGraphics drawing when device orientation changed

Android: Activity orientation is not always changed after screen rotation

AppDelegate should call the method if the screen orientation has changed

Reload screen when the tab is changed?

Azure maps resets when screen orientation change

lockCanvas failing when screen orientation changes

Rotate touchpad when screen is orientation rotated

Screen Orientation Resets When Navigating Between Activities

Why is there ClassNotFoundException when i change screen orientation?

Map behavior changes when changed to landscape orientation using fragments

When Orientation is changed effects are not applied (swift3)

How to Move Object when device orientation get changed?

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

Autolayout constraint issue when device orientation gets changed

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

Sound plays over and over when each time mobile orientation is changed

Automator: change wallpaper when screen brightness is changed

Suppress CSS transition when screen size is changed

Trigger useEffect when screen dimension has changed

Screen resolution is not automatically changed when login