简体   繁体   English

如何从列表视图中获取不在视图中的数据?

[英]How to get the data from listview which are not in view?

Hey friends i have use 2 text view now when i fetch data from list view then data which are seen in my phone window are fetched but data which in list view but not view. 嗨,朋友们,当我从列表视图中获取数据时,我现在使用2文本视图,然后获取在手机窗口中看到的数据,但在列表视图中却没有视图中的数据。 this data only view when i scroll list but i do not want to scroll and get the all data from list. 此数据仅在我滚动列表时查看,但我不想滚动并从列表中获取所有数据。 so please suggest me the solution. 所以请给我建议解决方案。 and helpers must give some reward point. 佣工必须给点奖励。

使用getAdapter() ,从findViewById()获取项目的View并检索数据。

this can be done if u can get your text information from adapter by using Adapter 如果您可以使用适配器从适配器获取文本信息,则可以完成此操作

myadapter=MyList.getAdapter ;
        View rowview=myadapter.getView(i,null,MyList);

now find textview by its id in rowview after that to chewck whether check box is checked or not then u can maintain booleon type array in custom adapter and maintain evrey checkbox state. 现在,可以在rowview中通过其id查找textview,以检查是否选中了复选框,然后可以在自定义适配器中维护booleon类型数组,并保持evrey复选框状态。 This is complete solution of your problem.. 这是您问题的完整解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM