您的位置:首页 > 移动开发 > Android开发

ListView一些常用的style设置

2015-06-26 14:53 615 查看
去除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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息