如何设计在Android的自定义列表视图? [英] How to design custom list view in android?

查看:97
本文介绍了如何设计在Android的自定义列表视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

推荐答案

大量的教程在Web上:

Plenty of tutorials on the web for that:

  • <一个href="http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/">http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/
  • <一个href="http://www.josecgomez.com/2010/05/03/android-putting-custom-objects-in-listview/">http://www.josecgomez.com/2010/05/03/android-putting-custom-objects-in-listview/
  • <一个href="http://androidguys.com/2008/07/14/fancy-listviews-part-one/">http://androidguys.com/2008/07/14/fancy-listviews-part-one/
  • http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/
  • http://www.josecgomez.com/2010/05/03/android-putting-custom-objects-in-listview/
  • http://androidguys.com/2008/07/14/fancy-listviews-part-one/

有关特定情况下,我的猜测是,在图标旁边,有一个 RelativeLayout的 TextViews 和使用自定义的背景可绘。这可绘制将定义不同的背景颜色与选择取决于安卓state_selected 和/或安卓STATE_ pressed 状态。

For that particular case, my guess is that, next to the icon, there is a RelativeLayout with three TextViews, and using a custom background drawable. That drawable will define different background colors with a selector depending on the android:state_selected and/or android:state_pressed states.

这篇关于如何设计在Android的自定义列表视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆