Android:为什么自定义按钮主题不适用于对话框?
因此,我使用一个应用程序范围的主题来实现自定义按钮集。自定义按钮在应用程序的所有活动中都显示得很好。然而,一项活动调用包含两个按钮的警报对话框。不幸的是,自定义按钮主题拒绝在这里应用。
我知道我可以实现另一个活动来代替警报对话框,它模仿其功能,但我必须这样做似乎不合逻辑。
我不明白的是为什么我的主题也不适用于警报对话框。是什么赋予对话框避免应用程序范围主题的特权?
So I'm using an application-wide theme which implements a custom button set. The custom buttons show up just fine in all of the app's activities. One activity however, calls an alert dialog which contains two buttons. Unfortunately, the custom button theme refuses to apply itself here.
I understand that I could just implement another activity in place of the alert dialog, which mimics its functions, but it just seems illogical that I should have to do this.
What I don't understand, is why my theme does not apply to the alert dialog as well. What gives a dialog the privilege to avoid an app-wide theme?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅此博客:
http://podlesek.org/blog/blogpost /android-how-replace-default-buttons-include-those-dialogs
please see this blog:
http://podlesek.org/blog/blogpost/android-how-replace-default-buttons-including-those-dialogs