Android的米 - 自定义权限对话框样式 [英] Android M - custom permission dialog style

查看:1861
本文介绍了Android的米 - 自定义权限对话框样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在实施新的Andr​​oid中号权限模型,我注意到,在权限对话框不尊重我的styles.xml的主题化。

While implementing the new Android M permission model I noticed that the permissions dialog does not respect the theming of my styles.xml.

在我styles.xml我覆盖了对话和alertdialog风格是这样的:

In my styles.xml I override the dialog and alertdialog style like this:

<item name="android:dialogTheme">@style/Theme.dialog</item>
<item name="android:alertDialogTheme">@style/Theme.dialog</item>

是否有可能改变的主题化?

Is it possible to change the theming?

或者是因为这是一个系统对话框就像在设备设置?

Or is it because this is a system dialog like in the device settings?

推荐答案

没有,这是不可能的。权限对话框系统对话框,因此你不能改变它的主题:

No, it's not possible. The permissions dialog is system dialog, hence you can't change its theme:

在M开发preVIEW引入了一个新的应用程序的权限模型,简化了流程,为用户安装和升级应用程序。如果在M preVIEW运行的应用程序支持新的权限模型,用户不必授予任何权限在安装时或升级应用程序。相反,因为它需要他们,以及应用程序请求的权限系统显示一个对话框以用户请求的权限。

The M Developer Preview introduces a new app permissions model which streamlines the process for users to install and upgrade apps. If an app running on the M Preview supports the new permissions model, the user does not have to grant any permissions when they install or upgrade the app. Instead, the app requests permissions as it needs them, and the system shows a dialog to the user asking for the permission.

这篇关于Android的米 - 自定义权限对话框样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆