[英]how to set rounded corners with background tansparency object in android shape xml
I m tying to get rounded corners with background color in shape xml file. 我想在xml形状文件中获得带有背景色的圆角。 But its not working with corners. 但它不能正常工作。 Here is the output of the code 这是代码的输出
And here is the code 这是代码
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle" >
<solid android:color="#aaffffff" />
</shape>
</item>
<item>
<shape>
<corners
android:radius="11dp" >
</corners>
</shape>
</item>
</layer-list>
A quick help will be appreciated. 快速帮助将不胜感激。 Thanks in advance ! 提前致谢 !
try this: 尝试这个:
<item>
<shape android:shape="rectangle" >
<solid android:color="#aaffffff" />
<corners android:radius="11dp" />
</shape>
</item>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.