ListView一些常用的style设置

来源:互联网 发布:java 函数返回值 泛型 编辑:程序博客网 时间:2024/06/05 15:38

去除ListView下拉的到顶部或底部的渲染色

listview_ticket_chil.setOverScrollMode(View.OVER_SCROLL_NEVER);

android:R.string.xx 转为字符型

getApplication().getResources().getString(R.string.no_more_ticket)

用于圆角背景或item

<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" >    <solid android:color="#ffffff" />    <stroke        android:width="1dp"        android:color="#EBEBEB" />    <corners        android:bottomLeftRadius="4dp"        android:bottomRightRadius="4dp"        android:topLeftRadius="4dp"        android:topRightRadius="4dp" /></shape>

listview item块状

<ListView        android:id="@+id/listview_ticket_chil"        android:layout_width="match_parent"        android:layout_height="match_parent"        android:layout_marginLeft="10dp"        android:layout_marginRight="10dp"        android:layout_marginTop="10dp"        android:background="#EBEBEB"        android:cacheColorHint="#00000000"        android:divider="#EBEBEB"        android:dividerHeight="8dp"        android:scrollbars="none"></ListView>
0 0