
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape> <stroke android:width="1dp" android:color="#000" android:dashGap="3dp" android:dashWidth="3dp" /> </shape> </item> <!--设置只有底部有边框--> <item android:bottom="1dp"> <shape> <solid android:color="#ffffff" /> </shape> </item> </layer-list>
本文介绍了一种使用XML在Android中实现带有虚线边框及底部实线边框的方法。通过<layer-list>标签组织多个<item>元素,并在每个元素中定义了特定的形状和边框样式。

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



