如何按列进行排序明智的Andr​​oid的ListView? [英] How to sort Android ListView by Column wise?

查看:128
本文介绍了如何按列进行排序明智的Andr​​oid的ListView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有个列表视图中,它包含一个标题(如addHeaderView(布局)和部首具有三个柱),当我在报头的第一列则点击列表是根据该值撒谎入进行排序第一列,然后如果我点击标题的第二列然后根据第二列等列表进行排序。但现在它的工作就像每当我点击列表是基于第一列进行排序任何列凭什么我实现我的问题?

谢谢,
@nag。


解决方案

  1. 把标题列标题列表视图。

  2. 多列列表视图尝试。

  3. 来排序列表视图列,排序列表(String数组[])你的列表视图提供。

I've a list view in that it contain a header (like addHeaderView(layout) and Header having three columns) and when i click on first column of header then the list is to be sorted according to the values lied into the first column, then if i click second column of header then list is being sorted according to second column and so on. But now its working like whenever i click any column the list is being sorted based on first column so how can i achieve my problem?

Thanks, @nag.

解决方案

  1. Put header for column title in listview.
  2. for multi column in listview try this.
  3. to sorting listview column, sort the list (String array[]) you providing in listview.

这篇关于如何按列进行排序明智的Andr​​oid的ListView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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