android分割线
16lz
2021-01-23
http://blog.csdn.net/dekunchenivan/article/details/6640804
在Android布局文件layout中设置水平分割线:
<View
android:layout_width="fill_parent"
android:layout_height="1px"
android:background="?android:attr/listDivider"
/>
在Android布局文件layout中设置垂直分割线:
<View
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="?android:attr/listDivider"
/>
设置ListView分割线
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ListView
android:id="@+id/android:list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:divider="#FFCC00"
android:dividerHeight="4px"/>
</LinearLayout>
关键是这两句:
android:divider="#FFCC00"
android:dividerHeight="4px"
前一句是设置分割线的颜色,后一句是设置分割线高(即分割线的粗细)
更多相关文章
- Android文件的读写
- Android xml资源文件中@、@android:type、@*、?、@+引用写法含义
- Android 界面布局之RelativeLayout
- Android Studio App设置线性布局LinerLayout控件占屏幕长宽比例
- LinearLayout和RelativeLayout布局中使用android:orientation
- android 布局大全
- Android 布局属性大全
- Android布局属性详解
- Android布局