When I turn the device from portrait to landscape, my activity restarts. For that activity, I need to use both portrait and landscape mode.
How to show my Manifest file And where you can override to restart In my works this updated list items and some other functions have been updated: Example activity ?
android: configChanges = "orientation | keyboardHidden" Add this line to
& lt; Activity Activity: Name = ". Imgview" Android: configChanges = "orientation-keyboardHidden" android: label = "@ string / app_name" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt;
Changed the configuration on the public blank (configuration newConfig) {super.onConfigurationChanged (newConfig); Log.e ("ScreenMode" "," + ScreenMode); If (screenmode == 1) {Log.e ("ScreenMode", "" + ScreenMode); BuildUrl (Results, Start Page); ShowImageList (); } If (ScreenNode == 2) {showOneImage (forFunc); } If (screenmode == 0) {startOMG (); }}
Comments
Post a Comment