Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
64 views

My Activity specifies android:configChanges= "keyboard|keyboardHidden|uiMode|orientation|screenLayout|screenSize|smallestScreenSize|navigation" But still, when the user switches the ...
A.G.'s user avatar
  • 2,247
2 votes
0 answers
131 views

After reboot the LauncherActivity is created. Then following a config change the activity is destroyed and recreated. I could in the log that ActivityTaskManager: Config changes=80000000 is printed. ...
Dev_Cob's user avatar
  • 71
1 vote
1 answer
65 views

I have two activities - LaunchActivity and GameActivity. It's necessary for LaunchActivity to open first because it launches GameActivity with configuration parameters. This is working fine except ...
Bungles's user avatar
  • 2,319
0 votes
1 answer
110 views

My Vulkan-based game is based on NativeActivity and needs to avoid ALL activity destroy/recreate configuration changes because of the massive amount of load time it takes to do that. I currently have ...
Bungles's user avatar
  • 2,319
0 votes
1 answer
448 views

So for my flutter app I need to get the device (real) serial number for device identification reason for my app feature. Android id didn't suffice because if the device get factory reset, it will ...
Dias Utsman's user avatar
0 votes
1 answer
145 views

I have a scenario in my app where the expected behavior occurs during a device configuration change, such as an orientation change. This means that whenever the user changes the device's orientation, ...
Shah Zaman's user avatar
-1 votes
1 answer
186 views

Is there any way to observe settings change for my app? I mean the settings that user can change in the "Settings", particular for my app, like battery optimizations, background restrictions ...
Kamil Komnacki's user avatar
0 votes
0 answers
100 views

My game is based on NativeActivity and crashes for some reason when the user changes the phone language while the game is running. Why is this happening and how can I prevent it? My app consists of ...
Bungles's user avatar
  • 2,319
1 vote
2 answers
876 views

Yes, there are already a lot of answers available on stack overflow on the same topic, most of them stating the following approach: Manifest.xml: <activity android:name=".MainActivity&...
Jatin guglani's user avatar
1 vote
0 answers
61 views

In my app we are using mostly SP in order to help visually impaired people. However, sometimes font is just too big or too small and android components don't work very well, cutting some text or ...
htafoya's user avatar
  • 19.4k
0 votes
0 answers
146 views

This is My file where I want to fetch position on screen rotation. and my saveInstance state But I am Facing a logical error while the screen is rotated I am getting a position for first but ...
Henish Shah's user avatar
0 votes
0 answers
90 views

Here I am using different UX designs for portrait and landscape mode for a particlular activity. Created the folders layout-sw600dp and layout-sw600dp-land ,layout-sw720dp and layout-sw720dp-land for ...
Malhotra's user avatar
  • 251
0 votes
2 answers
330 views

I have some API calls on my activity and different UI design for portrait and landscape mode. I have added the below code in the manifest to avoid the activity recreation on mode change. But with the ...
Malhotra's user avatar
  • 251
0 votes
0 answers
98 views

I have an Activity A for which orientation (Portrait or Landscape) is set based on some condition. I have another activity B which is Portrait. Now when Activity A is in portrait mode and If I open ...
thebadassdev's user avatar
0 votes
1 answer
1k views

So I have this activity that creates 4 fragments for me, which are a bottom navigation bar. when I change to dark mode or light mode, the fragments reset and take me back to the "main fragment&...
moalzoabi's user avatar
1 vote
2 answers
1k views

I want to change the application content from English to Spanish/ French as per the selection. Do we have any build-in libraries for the same. I am new to this multilanguage part, so please help me ...
Malhotra's user avatar
  • 251
2 votes
0 answers
1k views

I'm trying to develop an app that would be able to change the System dark mode setting (device wide). It would enable us to quickly access that "dark mode" setting and easely toggle it. As I'...
Pierre Rose's user avatar
2 votes
1 answer
767 views

My Fragment: class FirstFragment : Fragment() { private lateinit var binding: FragmentFirstBinding private lateinit var viewModelFactory: FirstViewModelFactory private lateinit var ...
Sam Chen's user avatar
  • 9,150
1 vote
1 answer
66 views

I want to change String when change app locale there is Profile Fragment @Override public void onClick(View v) { Intent intent = null; switch (v.getId()) { case R....
Mohamed Sobhy's user avatar
7 votes
0 answers
117 views

Given the following situation (partially pseudo-code): User presses a button in Activity A which in turn executes this code: progressBar.setVisibility(VISIBLE) // by default is set as INVISIBLE ...
me.at.coding's user avatar
  • 18.5k
0 votes
1 answer
503 views

Im currently working with custom views which will be added to a layout dynamically. I understand how view states are safed and restored. According to the documentation, only views with an id will be ...
Tine's user avatar
  • 1
0 votes
1 answer
93 views

I'm developing an Android app. I have a RecyclerView, and I can expand my items (several at the same time). The problem ocurrs when the orientation changes. I have a ViewModel, so the data is loaded ...
neyogiry's user avatar
1 vote
1 answer
214 views

Currently using the below code but getting the same as normal for all Categories. Even if I go to setting and set as small also. Please help me. if ((getResources().getConfiguration()....
Mr_vmh's user avatar
  • 157
3 votes
3 answers
2k views

We implemented night mode to our application. it works like a charm except for its transition. We are using the Base Application class to implement it. The problem is no matter what we tried we couldn'...
Eren Tüfekçi's user avatar
2 votes
0 answers
365 views

I'm working on an app that has a Single Activity and a fullscreen Fragment in that activity that uses AR Core and inherits from Sceneform. What is a good strategy for handling orientation with AR ...
kjanderson2's user avatar
  • 1,359
0 votes
1 answer
160 views

I would like to trigger something if the table were tilt from portrait to landscape or vice versa. However the onConfigurationChanged is never get triggered. I have read few question raised few year ...
user7601309's user avatar
3 votes
2 answers
5k views

Anyone experiencing issues with BuildConfig.FLAVOR parameter? After Android Studio 3.6 update all of my BuildConfig usages in code were red (as if the import was removed) and I can't override it from ...
Martin's user avatar
  • 2,984
2 votes
0 answers
1k views

I want to change my app language , this is a code I've for supporting different api versions val config: Configuration = context.getResources().getConfiguration() val locale = Locale(...
Navid Abutorab's user avatar
2 votes
1 answer
2k views

I want to change my language in App (or set it from saved variable in SQLite database). It is working, but its behavior is really weird. If I open my app it will change Locale in onCreate but if I ...
Martin's user avatar
  • 2,984
1 vote
0 answers
113 views

I'm currently running into an issue in an ARCore Android app (this is without sceneform). I have an activity that has a fragment that holds the ARCore session object, as well as the OpenGL ES context ...
Soud Kyl's user avatar
2 votes
1 answer
465 views

When I change the locale/language of my phone, my parameters (selected theme and target language for translation function) which are saved on sharedPreference turn to default values. For example, ...
Cansu Yeksan's user avatar
1 vote
1 answer
1k views

I want to add the version code as a suffix of versionNameSuffix. Currently, I have: debug { versionNameSuffix ".debug" } How can I have something like: debug { ...
Anh-Tuan Mai's user avatar
  • 1,209
1 vote
0 answers
369 views

I am changing the app loacale like this, Language language = getPreferenceAppLanguage(); if (language == null) { return; } Locale locale = createLocale(...
jaydeep_gedia's user avatar
2 votes
1 answer
932 views

When I put in activity android:name=".MainActivity" android:configChanges="orientation|screenSize" and do it for each one of my activities, the layout when I flip the orientation in the emulator ...
Alexandra's user avatar
  • 135
0 votes
0 answers
123 views

I am an experienced Android developer and it is a shame that I am still ineffectively fighting against fundamental issues like persisting UI changes across configuration changes. I know, this is an ...
Manish Kumar Sharma's user avatar
2 votes
0 answers
520 views

First of all, here are things I've done so far: (1) I handle screen rotation, orientation changes and Multi-Window related config changes inside my application. (2) I forbid all kinds of configChanges:...
Sergey Emeliyanov's user avatar
9 votes
4 answers
2k views

I'm trying to achieve a layout that shows a view pager when the device is shown on portrait and show two panes when device is on landscape. So I made two different layout files, one with only a ...
Nicolas's user avatar
  • 7,209
0 votes
1 answer
225 views

there are a lot of questions around this, however I was not able to solve. My app shouldnt restart when the device is put into a specific car cradle. I just want to ignore it I tried changing ...
Ti Smith's user avatar
7 votes
2 answers
5k views

I'm working on a application which supports two different languages - English Arabic The user can switch to any language at any time & based on the selection I'm changing the app language. ...
AndroidCoder's user avatar
  • 2,735
1 vote
2 answers
353 views

I have a DialogFragment in my Android app, and I need to set android:configChanges="orientation|screenSize, I want to load different layout for my DialogFragment in portrait or landscape, but now ...
newszer's user avatar
  • 440
9 votes
0 answers
2k views

I have implemented pip for my app. I note that in the Picture-in-picture support documentation it is suggested that android:configChanges= "screenSize|smallestScreenSize|screenLayout|...
Simon Hutton's user avatar
  • 1,807
6 votes
4 answers
1k views

I have an Activity with ViewPager. the ViewPager have a lot of pages, Just like a book. Each fragment has RecyclerViews with a lot of content. The following is my use case 1 - When I swipe page, ...
Vinayak B's user avatar
  • 4,520
0 votes
2 answers
180 views

According to Android guide "screenSize" changes when user rotates the device, why isn't "orientation" value enough to indicate that? Link to android guide of activity tag
Toka A. Amin's user avatar
0 votes
1 answer
267 views

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 ...
poppy's user avatar
  • 307
1 vote
1 answer
985 views

I am trying to get a single line from a multi line Edittext in its addTextChangeListener, using the textwatcher interface. I wanted to update another EditText with the only first line of this ...
Asgar Ahmed's user avatar
1 vote
0 answers
506 views

I have added "ConfigurationChanges = ConfigChanges.Locale" in MainActivity. Upon changing language from settings, the app restarts when selected from background but language change is not reflected. ...
Sri's user avatar
  • 23
1 vote
0 answers
537 views

I have an Android application in which I have given an option for the users to select the language. In my app I have given Hindi and English language when the user selects the language Hindi it shows ...
Prashant Bhopte's user avatar
1 vote
0 answers
167 views

Activity A starts for result activity B. The user rotate the smartphone. The user press the back button. Activity B is finished. Activity A is re-created. After the onCreate() method, is the ...
berlusca's user avatar
  • 119
-1 votes
2 answers
1k views

I am developing an Android app with camera intent to capture images. My app is not restricted to any orientation and should work on both and my app crashes when user start in portrait and then take ...
Nani's user avatar
  • 97
0 votes
1 answer
682 views

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 ...
JackWM's user avatar
  • 10.7k