做无线查房系统时,遇到一个按钮是上面两个圆角,下面两个方角类似标签的图片,一开始设置为:

android:topLeftRadius="8dip"

android:topRightRadius="8dip"

android:bottomLeftRadius="0dip"

android:bottomRightRadius="0dip"/>

结果发现整个按钮背景不显示,后修改为:

android:topLeftRadius="8dip"

android:topRightRadius="8dip"

android:bottomLeftRadius="1dip"

android:bottomRightRadius="1dip"/>

android:left="0dip"

android:right="0dip"

android:top="0dip"

android:bottom="0dip"/>

添加了padding属性后,可以正常显示了。

原文:http://www.cnblogs.com/shanshuijian/p/4867437.html

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐