3

Want to handle the Font Style Change myself.what will be the value? Using the below values now.But the system kills the app and restartsenter image description here. android:configChanges="orientation|keyboardHidden|fontScale|locale|layoutDirection|screenSize|screenLayout|mnc|mcc|uiMode|navigation|smallestScreenSize"


Thanks
Nitz

Mycoola
  • 1,135
  • 1
  • 8
  • 29
NitZRobotKoder
  • 1,046
  • 8
  • 44
  • 74

1 Answers1

3

I don't think this is possible, unfortunately. This seems to be using a different mechanism instead of configuration changes.

  1. Setting up a service to listen for android.intent.action.CONFIGURATION_CHANGED does not receive an Intent when a new font is selected in the dialog (but it does when the font size is changed, for example).
  2. If it was handled as a configuration change, then the activities would be restarted, but not the app itself, as it's the case here.
  3. Even if it were, the android:configChanges attribute does not accept arbitrary values, but only those listed in the documentation. So there would be no way to handle custom configuration changes.

If I had to guess, I'd say that Samsung's custom UI forcibly restarts all applications whenever the font is changed.

matiash
  • 54,791
  • 16
  • 125
  • 154
  • #1 we do get a android.intent.action.CONFIGURATION_CHANGED event from system on font style change, but the the intent is of null.So it cant be used as identifier.#2 agree.#3 yeah this is custom android:configChanges value of samsung and cant be used in manifest.But i remember we could have put custom value sometime no complile error.Correct me!. – NitZRobotKoder Dec 08 '14 at 10:39
  • AFAIK that is not possible, sorry. But maybe someone else will come up with a solution? – matiash Dec 08 '14 at 16:34
  • When font is changed, then activity is restarted,not the whole application. – Mahantesh M Ambi May 17 '16 at 10:53
  • in my case the app is crashing instead of restarting? – GvSharma Nov 09 '17 at 05:28