Questions tagged [onconfigurationchanged]
154 questions
0
votes
1 answer
Error inflate SupportMapFragment onConfigurationChanged
I need to load the correct layout, depending on the orientation.
But the problem is that I do not want to reload code, but simply reload the layout.
I tried setContentView(R.layout.activity_main) but when that line is executed, I get the following…

Sergio Antonio Snchez Camarero
- 389
- 4
- 18
0
votes
0 answers
Alert Dialog not changing to landscape/portrait layout on orientation change
I have a custom AlertDialog which is opened by a button click. I have made two xml layouts for it. Normal portrait layout and landscape which I put into res/layout-land folder. When dialog is opened, I change the screen orientation and it won't…

orglce
- 513
- 2
- 7
- 19
0
votes
1 answer
After screen orientation change activity class member variable(Object) loss
I have a base class for managing fragment inside my Activity. which handles fragment backstack,opening etc. but on Orientation change this object become null and i loss all my fragment state.
public class Dashboard extends AbstractNavDrawerActivity…

Pramod mishra
- 615
- 6
- 16
0
votes
1 answer
Save reference to interface callback in DialogFragment after configurationChange
I have an Activity that host a Fragment. In that Fragment I open a DialogFragment.
In the Fragment I call this function to show the dialog. Note that before showing the dialog I set an Interface defined in the DialogFragment.
private void…

FOMDeveloper
- 4,370
- 3
- 21
- 20
0
votes
0 answers
How to allow the device rotation while onPostExecute (UI Blocking Task) running
I'm new to android but based on my understanding that onPostExecute has to run on the main UI thread to be able to access Views and so on which blocks the UI until it finishes. But the application looks ugly -as if it's crashing- when I try to…

Mazen Elkashef
- 3,430
- 6
- 44
- 72
0
votes
1 answer
Track Orientation Changes without using onConfigurationChanged()
I have been working on an assignment that simply displays a text field counting the number of time orientation changed as shown below.
What i'm trying to accomplish with the app:
The problem the above app's code is using onConfigurationChanged(),…

Seth
- 1
- 2
0
votes
2 answers
onConfigurationChanged is not getting triggered
I have to detect when the configuration has changed. I have put the configChanges conditions in the manifest
…

suku
- 10,507
- 16
- 75
- 120
0
votes
1 answer
Change image rotation in onConfigurationChange
I want to rotate image when configuration changes. I found a working code but it requires Api 17. How could i make it compatible for Api 11.
public class CustomImage extends ImageView {
private Bitmap mSource;
public CustomImage(Context…

Zar E Ahmer
- 33,936
- 20
- 234
- 300
0
votes
1 answer
Retain same instance of Fragment on configuration Change
I have the following issue. My application has 2 fragments, the first one that is executed show a list of items, when you tap on an item, shows a detail fragment.
I also have a NavigationDrawerActivity, with the following methods to handle the stack…

maxi182
- 33
- 5
0
votes
2 answers
Android Ignore configuration change
A requirement of my application is that it must stay in portrait orientation at all times except when the user is viewing media.
In my manifest I have set android:configChanges="orientation|screenSize" so onConfigurationChanged gets called each…

DJ-DOO
- 4,545
- 15
- 58
- 98
0
votes
1 answer
Handle orientation changes
I've been developing a project for class and I have reached a point that after much searching in google still cannot find the solution.
This is the error I get
06-04 15:07:55.398 3480-3480/com.example.chema.agenda E/AndroidRuntime﹕ FATAL…
0
votes
2 answers
Orientation change notification in Android
Trying to follow something. Boiling down to simplest: In my AndroidManifest.xml I have the following:
In my activity that runs I have…

user2399453
- 2,930
- 5
- 33
- 60
0
votes
3 answers
TextView value doesn't restore when screen is rotated - Android
I have looked at other posts and tried out the solutions suggested but none have worked for me. I have a simple app, that has a button and Textview and when the user presses the button the value in TextView will increase by 1. (The textview only has…

Android
- 171
- 1
- 4
- 16
0
votes
1 answer
Setting up Orientation.. different designs for both portrait and landscape mode.. without resetting the entered value
i have different layout design for portrait mode and a different looking layout for landscapre mode.. inside 'res' folder, i created a new folder called 'land-layout', where i created the file with the same name as inside 'layout'.
i have the…

rattlehead
- 57
- 9
0
votes
1 answer
Start activity in landscape mode and it can rotate to portrait also
I am developing an app having one activity have two different views for Landscape and Portrait mode. Everything fine on handling orientation but the problem is that I want to show Landscape mode first and then user can change orientation to portrait…

Ravi Kant
- 820
- 6
- 13