public void displayI18nMessage() {
// Only display the alertDialog if the device language is not handled
String deviceLanguage = Locale.getDefault().getLanguage();
if (!I18nHelper.isLanguageSupported(deviceLanguage)
&& !Util.Pref.getBool(this, Util.Pref.PrefKeys.I18NDialogShown, false)) {
if (this.isFinishing())
return;
new AlertDialogWrapper.Builder(this)
.setMessage(R.string.i18n_message)
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/chteuchteu/Blurify#how-to-help-translate-blurify")));
}
})
.setNegativeButton(R.string.no, null)
.show();
Util.Pref.setBool(this, Util.Pref.PrefKeys.I18NDialogShown, true);
}
}
Activity_Main.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:Blurify
作者:
评论列表
文章目录