Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
673 views
in Technique[技术] by (71.8m points)

localization - android change language listener

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 be turned off by system during such operation, however I have to be 100% sure, that this is official rule.

Do you know something about this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

An Intent is broadcast for this:

http://developer.android.com/reference/android/content/Intent.html#ACTION_LOCALE_CHANGED

You can register a BroadcastReceiver in your manifest to handle it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...