更改运行时权限的语言
change the language of runtime permission
如何在android中更改运行时权限的语言?
当我尝试使用
更改语言时
Configuration config = getBaseContext().getResources().getConfiguration();
locale = new Locale(lang);
Locale.setDefault(locale);
Configuration conf = new Configuration(config);
conf.locale = locale;
getBaseContext().getResources().updateConfiguration(conf, getBaseContext().getResources().getDisplayMetrics());
它更改了应用程序语言,但更改了相机的权限,此类对话框仅以英文显示。
有什么方法可以更改权限对话框语言吗?
Is there any way to change the permission dialog language?
让用户更改他们的设备语言。
最多,您的方法会改变您的应用进程使用的语言(尽管这可能会在 Android N 上改变)。任何系统提供的 UI,例如权限对话框,都将使用用户为其设备选择的语言。
为此,您需要在更改应用程序语言之前或之后创建自己的对话框或更改单元格的语言phone。
如何在android中更改运行时权限的语言?
当我尝试使用
更改语言时Configuration config = getBaseContext().getResources().getConfiguration();
locale = new Locale(lang);
Locale.setDefault(locale);
Configuration conf = new Configuration(config);
conf.locale = locale;
getBaseContext().getResources().updateConfiguration(conf, getBaseContext().getResources().getDisplayMetrics());
它更改了应用程序语言,但更改了相机的权限,此类对话框仅以英文显示。
有什么方法可以更改权限对话框语言吗?
Is there any way to change the permission dialog language?
让用户更改他们的设备语言。
最多,您的方法会改变您的应用进程使用的语言(尽管这可能会在 Android N 上改变)。任何系统提供的 UI,例如权限对话框,都将使用用户为其设备选择的语言。
为此,您需要在更改应用程序语言之前或之后创建自己的对话框或更改单元格的语言phone。