我有两个主题,我在Android应用程序之间来回切换.在某些地方,我TextView想要保持默认颜色.在其他地方,我希望它们是另一种颜色(让我们说橙色).在改变主题时,我只想要TextView以前变成蓝色的s.
有没有办法在Android中执行此操作?我有一些想法,比如html/css中的类标记,但似乎找不到任何东西.
编辑:用html/css等价来澄清我所说的内容:
<div>This text is black</div>
<div class="redDiv">This text is red</div>
.redDiv {
color:red;
}
Run Code Online (Sandbox Code Playgroud)