专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Android

为什么ListView的Item背景没有显示groupbox呢?貌似android:state_window_focused="false"没有起作用?解决方法

发布时间:2010-05-30 10:55:50 文章来源:www.iduyao.cn 采编人员:星星草
为什么ListView的Item背景没有显示groupbox呢?貌似android:state_window_focused="false"没有起作用?
以下是ListView的布局:
  <RelativeLayout
  android:layout_width="fill_parent" 
  android:layout_height="wrap_content"
  android:background="#000000">
  <View
  android:layout_width="fill_parent"
  android:layout_height="368px"
  android:background="@drawable/h_bg"/>
  <ListView
  android:id="@+id/lv_main"
  android:layout_marginLeft="16px"
  android:layout_marginTop="20px"
  android:layout_width="448px"
  android:layout_height="wrap_content"
  android:cacheColorHint="#00000000"
  android:divider="#00000000"
  android:dividerHeight="10dip"
  android:listSelector="@drawable/detail_list_item_selector"
  />
  </RelativeLayout>

以下是detail_list_item_selector
<selector xmlns:android="http://schemas.android.com/apk/res/android">
  <!-- The stateful background drawable for a widget -->
  <item android:state_window_focused="false" android:drawable="@drawable/groupbox"/>
  <item android:state_pressed="true" android:drawable="@drawable/group_list_sel_feedback"/>
  <item android:state_focused="true" android:drawable="@drawable/group_list_sel_feedback"/>
  <item android:drawable="@drawable/groupbox"/>
</selector>

为什么ListView的Item背景没有显示groupbox呢?貌似android:state_window_focused="false"没有起作用?

------解决方案--------------------
应该没问题
去掉<item android:drawable="@drawable/groupbox"/>试试
------解决方案--------------------
或者<item android:state_window_focused="true" android:drawable="@drawable/groupbox"/>
看看有没有变化
------解决方案--------------------
我也没搞定。55
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: