HoloEverywhere:黑暗动作条和对话框 [英] HoloEverywhere: Dark action bars and dialogs

查看:114
本文介绍了HoloEverywhere:黑暗动作条和对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用HoloEverywhere库,我需要的动作条和对话框(ProgressDialog和AlertDialog)与全息黑暗的主题和控制与全息光剩下的样式。

I'm using HoloEverywhere library, I need action bars and dialogs (ProgressDialog and AlertDialog) to be styled with the Holo Dark theme and the rest of the controls with the Holo Light.

我设置应用主题Holo.Theme.Light.DarkActionBar(这是最接近我需要什么,到目前为止),但这个我取光的对话框。

I set the application theme to Holo.Theme.Light.DarkActionBar (this is the closest to what I need so far) but with this I get Light dialogs.

我怎样才能做到这一点?

How can I achieve this?

在此先感谢。

推荐答案

为对话创造新的上下文包装:

Create new context wrapper for dialogs:

Context dialogContext = new ContextThemeWrapper(this, R.style.Holo_Theme);
Dialog dialog = new AlertDialog.Builder(dialogContext).create();

这篇关于HoloEverywhere:黑暗动作条和对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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