listView透明背
16lz
2021-01-23
<ListView android:id="@id/chatting_history_lv" android:background="@null" android:scrollbars="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:listSelector="@drawable/mm_chat_listitem" android:transcriptMode="alwaysScroll" android:cacheColorHint="#00000000" android:divider="@null" />
该段代码摘自 微信的聊天布局文件。 经测试 android:background="@null" 确实可以实现。网上N多版本都说 android:background="#00000000" 在大多数机型上显示良好。但是也会有少部分机型适配有问题@null可以基本上解决适配问题
更多相关文章
- Android弹性收缩自适应布局FlexboxLayout
- Android布局(layout)
- Android布局文件属性
- Android百分比布局初探
- Android布局技巧大全(持续更新..........)
- Android5大布局方式
- Android处适应布局