android - android中形状的角颜色
解决方案
尝试stroke
在您的布局文件中使用。stroke
可以给你边框颜色和宽度。
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<stroke android:color="@color/yourcolour"
android:width="4dp"
/>
//Other adjustments
</shape>
让我知道这是否是您要找的
或者,如果您想要图像中的内容,请尝试以下操作
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item >
<shape android:shape="rectangle">
<solid android:color="@android:color/holo_red_dark"/>
<stroke android:color="@android:color/black"
android:width="10dp"
/>
</shape>
</item>
<item >
<shape android:shape="rectangle">
<solid android:color="@android:color/holo_blue_bright"/>
<stroke android:color="@android:color/black"
android:width="10dp"
/>
<corners android:bottomLeftRadius="150dp"/>
</shape>
</item>
</layer-list>
推荐阅读
- angular - 角度选择选项隐藏不活动但仍显示历史价值
- spring - 我在 Centos 中使用 Mongodb(在我的 mac 中使用 VirtualBox)和在我的 mac 中使用 Spring4。所以它们没有连接每个
- hyperledger-fabric - Hyperledger Fabric 函数重命名导致错误
- php - PHP Href 有不同的 url
- python - int object is not subscriptable python中的错误
- python - 无法解决 TypeError: unorderable types: time.struct_time() > float()
- vba - Microsoft Visio 2013 / 16 的形状连接邻居类型的自动检测
- android - Koin 在模块之间共享实例
- java - 从millis开始错误的int day
- javascript - 如何在 react-native 的实验性 WindowedListView 中实现滚动恢复