您的位置:首页 > 其它

点击ListView时背景阴影

2016-07-21 18:04 155 查看
只需要在ListView的item里面父控件添加一个选择器

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/list_item_selector"
     >
***********************************************************
</RelativeLayout>

<item android:drawable="@color/item_bg" android:state_pressed="true"/>      <color name="item_bg">#dfdfdf</color> <!-- 条目背景 -->
<item android:drawable="@color/white"/>                                      <color name="white">#FFFFFF</color>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: