I was doing this way:
context.getResources().getConfiguration().locale
Configuration.locale
is deprecated if target is 24. So I made this change:
context.getResources().getConfiguration().getLocales().get(0)
Now it says that it's only for minSdkVersion
24, so I cannot use it because my min target is lower.
What's the right method?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…