Questions tagged [android-configchanges]
185 questions
0
votes
2 answers
Dialog null after orientation change in viewpager
Each time I swipe there will be a new page loaded now I had everything working in portrait first and now I am trying to get it working with landscape and portrait. But when I rotate my screen I will get a NullPointerException on my Dialog.
The…

Shishi
- 601
- 2
- 8
- 27
0
votes
1 answer
Restoring data on rotation with screen off
I am storing data to the "outState" in this method:
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putInt("my_int", mValue);
}
This means, that when the…
user2442638
0
votes
1 answer
Handling background tasks and activity configuration changes
Here is problem which I'm trying to solve for three days:
For example, REST client app perfoms a lot of background work (network calls) and posts result back to UI thread. It is obvious that it should be done asynchronously. Android allows to do…

Araz Abishov
- 1,661
- 3
- 15
- 26
0
votes
1 answer
The first Activity is destroyed when pressing Back button from SecondActivity
I'm implementing an Android app playing online Video and get the error. For the simplicity, I made an sample app here. There are 2 activities: MainActivity and SecondActivity.
MainActivity
public class MainActivity extends Activity {
public…

Huy Duong Tu
- 7,798
- 5
- 25
- 46
0
votes
1 answer
how to change UI based on orientation but at the same avoid activity restart when orientation change
HI I am new to android application development.I know android:configChanges="orientation|screenSize" is used to avoid activity Restart but it does not allow UI(layout-port,layout-land) changes too.But What i want is,
I need to avoid activity restart…

sierra
- 1
- 2
0
votes
2 answers
Prevent GridView from scrolling on onConfigurationChanged
When configuration of the activity changes I apply this code -
public void onConfigurationChanged(Configuration newConfig)
{
super.onConfigurationChanged(newConfig);
…

Mihir
- 2,064
- 2
- 21
- 28
0
votes
1 answer
configChanges issue when rotating device between two activities [+VIDEO]
I have two activity. The app starts, I start the second activity. I rotate the device. I go back to the first activity. Black area shows up during the animation. This is way I set
android:configChanges="keyboardHidden|orientation|screenSize"
in my…

gderaco
- 2,322
- 1
- 16
- 18
0
votes
2 answers
Orientation interferes with NavigationDrawer
I have an app which uses the NavigationDrawer.
I switch fragments like this:
private class DrawerItemClickListener implements
ListView.OnItemClickListener {
@Override
public void onItemClick(AdapterView> parent, View…
user2442638
0
votes
1 answer
Don't reload Activity orientation change but still reload Fragments
Im using a MainActivity with a few Fragments.
In the Activity I connect to a server.
I used: android:configChanges="orientation|screenSize" in my Manifest.
So that the Activity keeps the connection on orientation change.
But now I cant use…

TeKo
- 465
- 1
- 5
- 17
0
votes
0 answers
Android change local configuration doesn't work
I am building an application which comes in two languages, using a setting activity where the user can change the language. Once the user has selected any language, I want to save his/her choice so when the application is launched again, the new…

Marco Dinatsoli
- 10,322
- 37
- 139
- 253
0
votes
1 answer
android:configChanges="orientation" with surfaceChanged
In one activity implementing SurfaceHolder.Callback, I include the line android:configChanges="keyboardHidden|orientation|screenSize" to stop the activity from being redrawn when, among other things, the screen is rotated. However, surfaceChanged()…

1''
- 26,823
- 32
- 143
- 200
0
votes
1 answer
ActionBar is re-created always
I have created the action bar and tabs like in my previous post,
Fragment webview java script function is not working
Menu in Action bar Android.
I have loaded the webview in the ActionBar. In the webview I have place a button for capturing the…

Karthick
- 1,241
- 5
- 20
- 43
0
votes
1 answer
Fragment save state on configuration change
I am developing twitter client.
I have TimelineFragment with loaders which load data from db and web.
I have setRetainInstance(true) in onActivityCreated.
When orientation change view recycled? how i can prevent this?

Mecid
- 4,491
- 6
- 30
- 30
0
votes
1 answer
LoaderCallbacks missed after rotation
I have this problem every time I use loader. If I start my AsyncTaskLoader and then rotate screen (doesn't matter one or several times) onLoaderFinished() is not called. loadInBackground() finishes its work but onLoaderFinished() is not called. It…

Alex Zaitsev
- 2,013
- 4
- 30
- 56
0
votes
1 answer
If my GLSurfaceView app never needs to read the Android device's locale, can I safely ignore locale config changes?
By default, if the user changes the display language of their device while my app is running, Android will destroy then recreate the Activity. It does this to be sure my app is correctly using the latest settings.
I can override this behaviour by…

tenpn
- 4,556
- 5
- 43
- 63