Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Font restarts activity

Activity is getting restarted when system font is changed while app is running.

Is there any way I can avoid restarting of my Activity? I tested it with basic "Hello World" application.

I am using Android 4.1 as target

PS: I have tried using android:configChanges but there wasn't any flag related to font change.

like image 851
sachy Avatar asked Jan 15 '13 10:01

sachy


1 Answers

U should use android:configChanges="fontScale" . but you would then need to handle that configuration change yourself by overriding onConfigurationChanged() Can refer this

like image 123
user1969053 Avatar answered Oct 19 '22 10:10

user1969053