修改现有主题 [英] Modify existing theme

查看:161
本文介绍了修改现有主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能(以及如何)自定义现有的主题。

I would like to know if it is possible (and how) to customize an existing theme.

我要找的是我怎么可以检索特定属性(即颜色),并改变它,当活动开始之前<$ C重新修改后的主题$ C>的setContentView()。

What I'm looking for is how can I retrieve a certain attribute (i.e. color) and change it when the Activity starts and reapply the modified theme before setContentView().

setTheme 但(),而不是使用资源ID相似,使用修改后的主题。

Similar to setTheme(), but instead of using a resource id, use the modified theme.

推荐答案

根据进一步的研究和Eric的评论目前还没有以编程方式修改一个主题一个可行的办法。不同的主题可以应用编程但是不能修改。一旦样式以XML设置,则它不能被修改

Based on further research and Eric's comment there is not yet a possible way to modify a theme programmatically. Different themes can be applied programmatically but not modified. Once the style is set in XML, it cannot be modified.

这篇关于修改现有主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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