【发布时间】:2017-04-24 05:28:58
【问题描述】:
【问题讨论】:
标签: android list border shape layer
【问题讨论】:
标签: android list border shape layer
【讨论】:
您可以设置任何您想要的布局。只需自定义布局,名称为 customborder 并添加 xml 代码
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:radius="20dp"/>
<padding android:left="10dp" android:right="10dp" android:top="10dp" android:bottom="10dp"/>
<stroke android:width="1dp" android:color="#CCCCCC"/>
</shape>
然后像这样简单地将背景添加到布局中
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/customborder">
希望这会有所帮助。
【讨论】: