HoloEverywhere: Dark action bars and dialogs

喜你入骨 提交于 2019-12-06 07:01:28

问题


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.

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?

Thanks in advance.


回答1:


Create new context wrapper for dialogs:

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


来源:https://stackoverflow.com/questions/15774201/holoeverywhere-dark-action-bars-and-dialogs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!