边界形状XML [英] Border in shape xml
本文介绍了边界形状XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图做一个绘制使用的按钮。我想它有这个色彩,与它周围的一个2px的边框。
I am trying to make a drawable to use for a button. I would like it to have this coloring, with a 2px border around it.
一切都工作得很好,除了我不能让边界展现出来......
Everything works just fine except I cannot get the border to show up...
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient android:startColor="@color/bar_clicked_dark"
android:endColor="@color/bar_clicked_light"
android:angle="90"/>
<corners android:bottomLeftRadius="0dp"
android:topLeftRadius="15dp"
android:bottomRightRadius="15dp"
android:topRightRadius="0dp" />
<stroke android:width="2px"
color="#ff00ffff" />
</shape>
在此先感谢您的帮助!
Thanks in advance for any help!
推荐答案
看起来你忘了在颜色标签上的preFIX。尝试
It looks like you forgot the prefix on the color tag. Try
<stroke android:width="2px" android:color="#ff00ffff"/>
这篇关于边界形状XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文