![怎么能在矩形形状内画一条线android [复制],第1张 怎么能在矩形形状内画一条线android [复制],第1张](/aiimages/%E6%80%8E%E4%B9%88%E8%83%BD%E5%9C%A8%E7%9F%A9%E5%BD%A2%E5%BD%A2%E7%8A%B6%E5%86%85%E7%94%BB%E4%B8%80%E6%9D%A1%E7%BA%BFandroid+%5B%E5%A4%8D%E5%88%B6%5D.png)
参见英文答案 > Android: How can i use the layer-list and shape elements to draw a horizontal rule when set as background? 2个
我有这样的自定义矩形
<?xml version="1.0" enCoding="utf-8"?> <shape xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:shape="rectangle" androID:padding="10dp"> <solID androID:color="#FFFFFF" /> <stroke androID:wIDth="1dip" androID:color="#ff6600" /> <corners androID:bottomrighTradius="5dp" androID:bottomLefTradius="5dp" androID:topLefTradius="5dp" androID:topRighTradius="5dp"/></shape>我想在这个矩形内画一条线
<shape xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:shape="line" > <solID androID:color="@color/cafe" /> <stroke androID:wIDth="5dip" androID:color="#FF0000" androID:dashWIDth="5dip"/></shape>我怎么能这样做,帮助
解决方法:
关键字是layer-list.这是一个非常好的例子,完全基于xml:Android: How can i use the layer-list and shape elements to draw a horizontal rule when set as background?
以上是内存溢出为你收集整理的怎么能在矩形形状内画一条线android [复制]全部内容,希望文章能够帮你解决怎么能在矩形形状内画一条线android [复制]所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)