Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Font Change restarts application in android

Tags:

java

android

When I change the system font on an android device, my app is getting restarted (not just current activity). I am sure of this as the pid itself is different.

Is there any way to prevent application restart?

This question is related to: Handle runtime activity configuration when font change

As described there, there is no configChanges attribute which can be used to handle system font change (fontScale works only for font size change).

like image 802
prk Avatar asked Jan 25 '26 04:01

prk


1 Answers

You should add the below line in your manifest. But you have to handle the configuration change by yourself.android:configChanges="fontScale"

Handling Runtime Changes

like image 145
Triode Avatar answered Jan 26 '26 16:01

Triode