一个视图中的多个样式值 [英] multiple style values inside a view

查看:97
本文介绍了一个视图中的多个样式值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我里面styles.xml定义2的样式。我想将它应用到一个TextView。如何实现使用样式=@style /

I have 2 styles defined inside styles.xml. I want to apply it to a textview. How to implement that using style = "@style/"

推荐答案

您不能。你将不得不创建一个融合了两种风格的样式。 (或者只创建一个风格,从你的风格之一继承,并添加第二个样式的额外数据)。

You can't. You will have to create a style which combines the two styles. (Or create just one style that inherits from one of your styles, and add the extra data of the second style).

这篇关于一个视图中的多个样式值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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