San*_*ana 2 android android-listview
我正在查看两个ListView之间的" 边框 ",如附带的屏幕截图(红色)所示,而不是ListView项目中的边框(白色).
知道如何设置ListViews之间的边框如图所示?

谢谢,萨娜.
如果你只是想要边框边框,我通常看到的只是在布局中的ListViews之间添加一个空视图.例如:
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ListView
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
/>
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="#FF0000"
/>
<ListView
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
/>
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:background="#FF0000"
/>
<ListView
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
这将为您提供三个ListView之间的1dp红色边框.
| 归档时间: |
|
| 查看次数: |
436 次 |
| 最近记录: |