android change language listener

后端 未结 2 1075
青春惊慌失措
青春惊慌失措 2020-12-15 20:26

Language can be changed in

Home > Menu > Settings > Locale & text > Select locale

I am wondering how can I detect such change? My application is seems to

2条回答
  •  伪装坚强ぢ
    2020-12-15 21:20

    http://developer.android.com/guide/topics/manifest/activity-element.html#config says:

    android:configChanges Lists configuration changes that the activity will handle itself. When a configuration change occurs at runtime, the activity is shut down and restarted by default, but declaring a configuration with this attribute will prevent the activity from being restarted. Instead, the activity remains running and its onConfigurationChanged() method is called.

    Note: Using this attribute should be avoided and used only as a last-resort. Please read Handling Runtime Changes for more information about how to properly handle a restart due to a configuration change.

    Any or all of the following strings are valid values for this attribute. Multiple values are separated by '|' — for example, "locale|navigation|orientation".

提交回复
热议问题