问题
Whenever I change font activity starts from onCreate(). How can I stop this?
回答1:
The reason for this is that changing the font scale fires a configuration change. You can see a list of that things that fire these configuration changes here.
To avoid it, you could add the attribute android:configChanges="fontScale"
- but you would then need to handle that configuration change yourself by overriding onConfigurationChanged().
I advise that you read about Handling Runtime Changes before you proceed.
来源:https://stackoverflow.com/questions/8254187/stop-activity-restart-on-font-change