Questions tagged [onconfigurationchanged]

154 questions
1
vote
0 answers

Rotating of screen with JW Player works bad in Android application

I have a task with JW Player - this player has to become in full screen while rotating device like in youtube. Rotate works good in both directions ( to right and to left) before I set data to player (Video Url). After that first rotating works…
1
vote
2 answers

Why does android:label's text not changing when user changes language within my app?

So within my app, the very first Activity that user sees is to choose language. Lets say if user chooses french and then goes to ActivityB, then to ActivityC. Now decides to changes language. So goes back to ActivityB and then to very first…
sofs1
  • 3,834
  • 11
  • 51
  • 89
1
vote
1 answer

Keep Canvas ratio and scaling in Android on rotation

I created CanvasView Object extending View class and I override configChanged in my application's manifest and as you can see, Canvas doesn't redraw again correctly. Portrait: Landscape It looks as the rotation doesn't affect the Canvas…
Gilad Eshkoli
  • 1,253
  • 11
  • 27
1
vote
1 answer

Cannot edit action bar title after orientation

I need to develop an app where it is possible to change the action bar title style dynamically. In tried to achieve this by accessing the action bar title in the following way: (TextView) findViewById( …
1
vote
1 answer

Set orientation programmatically but also listen for orientation changes?

Is it possible to set the orientation for an activity but to also listen for orientation changes using onConfigurationChanged()? In my activity, I want to start another activity when the user rotates the phone to landscape position, and to come back…
mpellegr
  • 3,072
  • 3
  • 22
  • 36
1
vote
0 answers

Why is my Orientation Change Going Unnoticed?

Based on the accepted answer here, I added this code to an Activity as what I hoped to be the first step in changing the assigned Layout for an Activity: @Override public void onConfigurationChanged(Configuration newConfig) { …
1
vote
1 answer

Preserve previous data of a different layout on orientation change

I have a fragment in an activity containing two layouts to show each for different orientations. For portrait orientation, firstLayout. For landscape orientation, secondLayout. Both the layouts are shown in a same container. So I have something like…
sjain
  • 23,126
  • 28
  • 107
  • 185
1
vote
2 answers

Does onConfigurationChanged method change activity lifecycle

I am an Android Beginner. According to the lifecycle of an android application, when screen orientation is changed following methods are called: onPause() onStop() onDestroy() OnCreate() onStart() onResume() But I have now added onConfigChanged in…
Gagan93
  • 1,826
  • 2
  • 25
  • 38
1
vote
0 answers

After configurationChange, the listView in the fragment will be initialized

Basically, I have 3 fragments: one fragment has the listView and editText, and the other two fragments have add and clear buttons in linearLayout, on oriented horizontally and the other vertically. When configuration changes, it should call…
1
vote
0 answers

onConfigurationChange is never called

So i have simple code, i just want to change layout when i screen orientation is changed. package com.example.asdasd; import android.app.Activity; import android.content.res.Configuration; import android.os.Bundle; public class MainActivity…
Pitonchina
  • 11
  • 2
1
vote
2 answers

onConfigurationChanged Rearrange layout for orientation

I have an image viewer app that handles very large images with significant caching. When a user rotates the device it would cause a hiccup if the app fully restarts. If I disable the orientation changes then device rotations are seamless, but I…
Anthony
  • 7,638
  • 3
  • 38
  • 71
1
vote
1 answer

Activity finished after changing locale

I have Activity A and called from it Activity B. In manifest Activity A has configChanges android:configChanges="locale|orientation|screenSize". In Activity A - for changing locale @Override public void onConfigurationChanged(Configuration…
1
vote
1 answer

android set app to portrait only, except when keyboard pulled out

a while back I converted my app to include landscape mode, from each activity having screenOrientation="portrait" to this:
1
vote
2 answers

Object Hide on Orientation Change

I would like to hide only a few elements on orientation change (LANDSCAPE). Where do I put this? Button bt0 = (Button) findViewById(R.id.button0); bt0.setVisibility(bt0.GONE); And then, make them comeback on PORTRAIT. They are already defined…
Bert Steve
  • 41
  • 6
1
vote
0 answers

ActiobarSherlock onConfigurationChanged Tabs Issue - Follow-Up

I have implemented the solution of the first ANSWER (by Amit), from this question: Actionbar Sherlock - tabs won't change in landscape when swiping I have the exact same scenario. I have it working and it's acceptable, but I have 1 small problem I…