Questions tagged [onconfigurationchanged]
154 questions
2
votes
7 answers
EditText data is lost on rotating the device
OK guys, I am done with it. I have been googling for last 2 days but I can't find the exact solution. Everyone is talking about configChanges and all those cliche things which do not seem to work in my case .
I have a login screen which consists of…

Yogesh Somani
- 2,624
- 3
- 21
- 34
1
vote
1 answer
Do you use same methods in onConfigurationChanged as in onCreate?
Let's say that onCreate looks like this
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
initializeElements();
setOnClickListeners();
…

sandalone
- 41,141
- 63
- 222
- 338
1
vote
1 answer
android -Fragments - onConfigurationChanged -it's possible to change only the layout?
I have a question related to fragments, the only solution to change the fragment layout it's if I remove the old instance and replace with new one?
I have two layout's one for portrait and one for landscape - I want to keep all the…

T. Lorand
- 31
- 5
1
vote
3 answers
Running an activity inside an activity?
I am developing a library for Android. This lib consist of a custom view. I'd like to be able to detect from my lib when onConfigurationChanged() is called for the activity.
My first thought was to use startActivity() with my own activity that only…

eFyx
- 21
- 4
1
vote
0 answers
How can I handle the Configuration Change caused by switching System Navigation whilst Xamarin.Forms app backgrounded?
I have my Xamarin.Forms app running on an Android device, then background it and open the 'Gesture Navigation' option in the device's settings app (System -> Gestures -> System navigation).
Switching from 'Gesture navigation' to '3-button…

Jonathan Websdale
- 588
- 3
- 16
1
vote
2 answers
onConfigurationChange() is not called
I found that in my app , onConfigurationChange() is not call. In manifest I put :
android:configChanges="keyboardHidden"
I want that when the keyboard is hide, onConfigurationChange() to be called. Why it is not called?
The method is not called…

Gabrielle
- 4,933
- 13
- 62
- 122
1
vote
2 answers
How handle Android Device 180 degree rotation (reverseLandscape)? - onConfigurationChanged is not called
When rotating phone 180 degree onConfigurationChanged Callback is not called, only works when changing rotation from portrait to landscape and vice verse, however rotating 180 degree when on landscape view is rotated however onConfigurationChanged …

Paruyr
- 37
- 1
- 8
1
vote
0 answers
how to make textureview to not be affected by configuration changes?
I am trying to make a camera application with a TextureView, I want to make my application so it will continue recording and show preview while configuration changes (such as orientation changes) without stopping, I trying to do it with ViewModel,…

evg
- 11
- 1
- 2
1
vote
0 answers
ListView doesn't show
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
setContentView(R.layout.layout_currently);
if(dHolder.getCurrentItems() == null)
{
defineView();
new…

M.V.
- 1,662
- 8
- 32
- 55
1
vote
2 answers
Android - detect orientation change, but have interface not respond
Is it possible in Android to capture screen rotate events but not actually have the activity respond to the rotate events?
To make things more difficult, I've got an activity backed by a TabActivity, and in one of the tabs I want to rotate some of…

Codz
- 315
- 1
- 2
- 10
1
vote
1 answer
screenOrientation abnormal in huawei P20
Activity A , B
android:screenOrientation="sensorLandscape" in A;
android:screenOrientation="sensorPortrait" in B;
startActivity A->B,then press back key to Activity A , A's orientation will First vertical screen and then horizontal screen,and …

RainYang
- 21
- 3
1
vote
2 answers
onConfigurationChanged not called after coming back from an Activity with different screenOrientation Settings
I have two Activities:
On some devices/emulators I have…

Thommy
- 5,070
- 2
- 28
- 51
1
vote
4 answers
Android app crashes on screen orientation change
I'm developing an application which will support multiple screens. I have created three layouts (large, small, medium). I'm testing it. I have two screens sign in and sign up.
In sign in it is working fine. But when I click on sign up button then I…

vivek_Android
- 1,697
- 4
- 26
- 43
1
vote
1 answer
Change clans fab menu orientation programmatically
I am using clans fab library to create a menu with a set of buttons.
My menu fab as an open direction set to "up", and this works pretty fine if the phone is in portait mode. However if I turn it to landscape mode, half the buttons get cropped.
I…

Ravers
- 988
- 2
- 14
- 45
1
vote
2 answers
Android MVP - network request that survives across configuration change
I followed several tutorials and open sources on the web and built simple app based on MVP architecture using RxJava, Dagger 2 and Retrofit. Everything works fine except when I start downloading data and immediately rotate the screen previous…

SpiralDev
- 7,011
- 5
- 28
- 42