Questions tagged [android-configchanges]

185 questions
1
vote
1 answer

How to maintain SoftKeyboard AND Refresh Layouts in Android

When the device rotates, I have different layouts based on portrait/landscape. So I can't put this line in manifest: android:configChanges="orientation|screenSize|keyboardHidden" However, if the user is in a EditText field and the keyboard is out,…
1
vote
1 answer

Refreshing view attribute (specified in resources) after configuration change

I have a dimen specified in values/ and values-w600dp/ because I would like an icon to be wider on very wide screens. values/ 32dp values-w600dp/ 48dp layout/
Mark
  • 7,446
  • 5
  • 55
  • 75
1
vote
2 answers

Older devices and AndroidManifest configChanges "screenSize"

Quoting the documentation: Caution: Beginning with Android 3.2 (API level 13), the "screen size" also changes when the device switches between portrait and landscape orientation. Thus, if you want to prevent runtime restarts due to …
1
vote
1 answer

Android - Forcing orientation in smartphones only

My app has 3 screens, and all of them must be portrait-only in smartphones and both orientation for tablets. Unitl now I was using the following code in OnCreate: if (!getResources().getBoolean(R.bool.isTablet)) { …
1
vote
1 answer

updating locale needs to override OnConfigurationChange which is not directing to layout-land xml which is again needed

I have been using Locale for app language which on orientation change needs to be reconfigured. But in my code I have to direct my activity to layout-land for which i need to destroy and recreate my activity to reset the Xmls. Can anyone tell me how…
sheetal
  • 3,014
  • 2
  • 31
  • 45
1
vote
3 answers

how to restore video play state in android webview

In my activity, I am loading you-tube video content into my web view like this: webview.loadData("