Questions tagged [android-configchanges]
185 questions
0
votes
1 answer
android:configChanges with an Async SQLite Call in onCreate being called when orientation changes
I am populating a ListView with the contents of an SQLite database. In my onCreate method in my StartList activity I call an AsyncSQLite which reads data from a JSON url and adds the data to the SQlite database.
But every time that I change my…

mhorgan
- 886
- 2
- 11
- 32
0
votes
3 answers
Empty list after orientation change
First off, I've already looked at this question. In my scenario, I have a fragment that extends support.v4.app.ListFragment. The fragment calls a custom adapter. I need to handle orientation changes on a device that will switch to a 2 pane layout. I…

Matt M
- 3,699
- 5
- 48
- 76
0
votes
2 answers
Dismiss dialogue after configuration is changed
I'm currently writing on a Bluetooth application only allowing the user to work with it in the portait mode. However, there are some other reasons causing confguration changes forcing me to show the user that the Bluetooth connection has been…

Lukas
- 756
- 7
- 20
0
votes
0 answers
Second fragmentStatePagerAdapter couldn't be restored after configuration changes
I have a problems making me sick for several days. My App consists only one activity with several main fragments. I have 2 FramentStatePageAdapter and the first one is replaced by the second one after choosing an item on it. But after orientation…

Hoang Dung Do
- 9
- 3
0
votes
2 answers
View hidden on start is not displayed again after showing view, then configuration change
Is this correct?
In layout have a checkbox marked as invisible or gone.
After creation, mark the checkbox as visible (i.e. after selecting a button).
Perform a configuration change (rotate device for example).
Checkbox previously marked as visible…

Zach
- 3,909
- 6
- 25
- 50
0
votes
2 answers
How to reuse layout set in setContentView? Android
I am trying to use android:configChanges="keyboardHidden|orientation|screenSize" in my Manifest so that I cannot lose state of my VideoView when configuration changes happen. This means I need to choose the layouts myself on the configuration. The…

Azurespot
- 3,066
- 3
- 45
- 73
0
votes
1 answer
Android vs configuration changed
I apologize for my English but translated with google. I'd like to understand why Google with Android restarts the activity at each change and you lose all the data displayed. How do you solve this problem? Could not they make it optional this…

itc.opra
- 83
- 2
- 6
0
votes
0 answers
Stop fragment re-creation on config change (different layouts for portrait and landscape)
Here is the layout design for my tablet portrait and landscape
Portrait layout
Menu Navigation Drawer and
Content Fragment
Landscape layout (Dual Pane)
Menu Fragment on the left
Content Fragment on the right
I am using support library…

Akh
- 5,961
- 14
- 53
- 82
0
votes
1 answer
Set orientation programmatically, without activity-recreation?
Whenever I use setRequestedOrientation(int) it behaves differently from when I declare the orientation in my Manifest.xml.
(this is expected)
I read that (from docs):
If the activity is currently in the foreground or otherwise impacting the screen…

justinvdk
- 172
- 2
- 11
0
votes
1 answer
Building Android OS For Devices
I am trying to build Android OS. I've set up my machine and everything is going on fine, but selecting the device configuration is my concern. When I type lunch, I get:
1 arm-eng
2 aosp_shamu-userdebug
3 aosp_fugu-userdebug
4…
user3994005
0
votes
1 answer
Don't reload activity and put fragments in correct order when orientation changes
I use framgents in my app and I have a dual pane layout for both landscape (left and right) and portrait (up and down) on a tablet.
I have an activity which loads a fragment into the left selection pane and then you can choose several criteria in…

KryNaC
- 379
- 4
- 21
0
votes
1 answer
Service vs AsyncTask to handle Configuration Changes and a TCP connection
This is the situation: my app has one activity, handles a long-lasting TCP connection and updates the UI dynamically with a lot of stuff (HashTables of objects, buttons, ArrayLists, adapters...).
At the moment, I handle the connection with an…

user2502368
- 467
- 1
- 4
- 16
0
votes
1 answer
Android SDK version: configChanges and deprecated methods
I am trying to build an app that will be compatible with low versions of Android. On the other hand, I noticed that if I set the target SDK Version to a higher value (like 19), some features work better; in particular, animations are a lot…

user1334767
- 587
- 4
- 17
0
votes
1 answer
How to re-attach the fragment to the activity?
When I rotate my screen the fragment will detach from the activity. However I have a listener in my fragment which runs the asynctask after a button is pressed. That works fine. So I'm searching way to do the same without the button so directly when…

Shishi
- 601
- 2
- 8
- 27
0
votes
1 answer
How to make a custom listener?
I want to make a listener inside my fragment which respond when the fragment become visible. I currently do it with a onPageListener inside the Activity but that doesn't work in my situation. What I need is to execute my AsyncTask in onStart when I…

Shishi
- 601
- 2
- 8
- 27