Questions tagged [android-configchanges]

185 questions
0
votes
1 answer

Android XML configChanges tag has no effect

The android:configChanges="screenSize|orientation|keyboardHidden"> tag has no effect. My activity always is destroyed when the device is rotated. I do not know why this is. I have added every possible flag to the above and it still has no effect.…
poppy
  • 247
  • 2
  • 15
0
votes
1 answer

When do we need to override callback onConfigurationChanged()?

If we do not want to restart the activity during config changes, we can set flag android:configChanges; If we need to restart the activity (i.e., to update resources), we should not set the flag. In what situations, do we need to set flag…
0
votes
2 answers

Re-inflate fragment layout on configuration change

My Android app is handling configuration changes manually (for reasons I cannot change) and need to re-inflate a GridLayout with different rows and columns depending on the orientation. My solution works great on the Nexus 5 emulator, but often…
tronman
  • 9,862
  • 10
  • 46
  • 61
0
votes
1 answer

ViewPager setCurrentItem(position) not working after orientation change

i'm facing an issue i can't seem to resolve and i'd like some help. My app is composed by an activity containing a fragment. After the user taps on a suggestion, activity's method onSuggestionClicked(String cardId) is called and activity's content…
0
votes
1 answer

android:configChanges="${configuration}"

While looking at an application manifest file, I found an activity with configChanges declared as : android:configChanges="${configuration}" I wasn't aware we could use variables in manifest file. Where should I look for the definition of this…
0
votes
1 answer

Handle System change when user changes permissions manually

I would like to know if there is a way to detect if a user manually toggled the LOCATION PERMISSION of my app. It seems that turning the LOCATION PERMISSION on/off restarts my app. How can this be handled? I've tried to add breakpoints to…
0
votes
4 answers

Restart activity only on orientation change

My app has many dialogs. When I change the orientation of the device, the dialog disappears along with the content entered, because activity restart is triggered on orientation change. I have two choices: save the content of every dialog in…
0
votes
1 answer

How to show persistent design and not messing up the guide lines

Well I know about the guidelines of android design but sometimes that wont help you in designing. Specifically if your given design in no way near to android native design but it is more near to web design . Well here is my picture which can give…
0
votes
0 answers

Custom AsyncTask with callback

I need to write AsyncTask that will get reference on new object instances after the screen rotation. I wrote Callback interface and in JukeTask declared weak reference to this field. JukeTask: public abstract class JukeTask
Denis Sologub
  • 7,277
  • 11
  • 56
  • 123
0
votes
3 answers

Fragment being reset after configuration change

I'm currently creating an app using a bluetooth connection. The connection is handled inside an simple object (HandleConnection). When the connection is made, my app goes into "remote" mode, which means I'm replacing my main fragment with another…
0
votes
1 answer

Restore Android GridView after screen orientation change (without reloading it)

I'm new to Android (this is my first application) and I made a GridView in an Activity which I'd like it to be responsive according to screen position (portrait / landscape). Of course I made some custom layout values of GridView rows width for…
0
votes
1 answer

Android list fragment not updated when configuration changes

I'm making a simple app that adds a location to the list fragment in main page, and as I add more addresses to the list, whenever configuration changes, those addresses are carried over, which is expected. However as you will see below, the empty…
Paul
  • 39
  • 1
  • 12
0
votes
0 answers

android fatal error at - URL_REGISTER, new Response.Listener

Coding android app registration module for the first time, getting a fatal error while running App after entering the mobile number during registration function & there is no request reaching to backend web-server - Code is as below : private void…
sachin
  • 1
  • 2
0
votes
1 answer

onConfigurationChanged not triggering on rotation of same size

I have a service that overrides onConfigurationChanged. It's getting called when you change orientation from portrait -> landscape and vice versa but the problem is when you are rotating from landscape -> landscape. When you are tilting your phone…
Marlon
  • 1,839
  • 2
  • 19
  • 42
0
votes
1 answer

Keep state of Fragment on Orientation change but replace its layout

I have an Activity (which is the launcher of the application) which has a ViewPager as a navigation menu between tabs. Inside this ViewPager I have different type of fragments. Currently, I'm not handling the orientation changes myself, so the…