且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何自定义权限对话框中的Andr​​oid?

更新时间:2023-01-23 21:41:27

简短的回答是,您不能

由于Android文档所说:

As android documentation puts:

当您的应用程序调用requestPermissions(),系统显示一个标准对话框给用户。您的应用程序的不能配置或改变该对话框。如果您需要提供任何资料或解释给用户,你应该做的,你叫requestPermissions()之前,如解释为什么应用程序需要的权限。

When your app calls requestPermissions(), the system shows a standard dialog box to the user. Your app cannot configure or alter that dialog box. If you need to provide any information or explanation to the user, you should do that before you call requestPermissions(), as described in "Explain why the app needs permissions".

所以,没有办法来定义权限对话框自定义布局现在

So, there is no way to define a custom layout for the permission dialog for now.