<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!-- item 的top left right bottom 相当于margin 设置不需要的边为负值 --> <item android:right="-1dp"> <shape> <corners android:radius="2dp"></corners> <!-- 背景颜色 --> <solid android:color="@color/white" /> <!-- 边框颜色 --> <stroke android:width="0.5dp" android:color="#bababa" /> </shape> </item> </layer-list>
android shape 边框
最新推荐文章于 2024-09-09 20:51:22 发布
本文详细解析了使用XML定义界面元素样式的具体方法,包括如何设置圆角、背景颜色及边框颜色等属性,并通过具体的代码示例展示了如何实现这些效果。
1万+

被折叠的 条评论
为什么被折叠?



