什么getSelectedItem的目的()从的ListView [英] What the purpose of the getSelectedItem() from the ListView

查看:420
本文介绍了什么getSelectedItem的目的()从的ListView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么getSelectedItem()从ListView控件的目的,如果一个列表不能保持所选项目的状态?

What the purpose of the getSelectedItem() from the ListView if a list can't keep state of a selected item ?

推荐答案

它可以跟踪选定的项目,如果你使用比方说,一个复选框或checkedtextview,但如果你想通过跟踪所选项目一个突出背景,那么它​​是不可能的(除非你想有一个隐藏的复选框)

It can keep track of a selected item if you were to use say, a checkbox or a checkedtextview, but if you want to keep track of your selected items via a "highlighted background", then it's not possible (unless you want to have a hidden checkbox)

这篇关于什么getSelectedItem的目的()从的ListView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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