n个电平扩展列表视图 [英] n level Expandable Listview

查看:114
本文介绍了n个电平扩展列表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何显示的扩展列表视图的android正的水平,我得到了3只水平扩展的例子。

How to display n- level of expandable list view android, I am getting only examples for 3-Levels expandable.

谈到这一点:<一href="http://www.allappsdevelopers.com/TopicDetail.aspx?TopicID=c991d70a-4570-4e4b-8378-2191a4247a84"相对=nofollow>链接

请指南或分享我适合例如在Android的多级扩展的显示。

Please guideline or share me suitable example for Multi-level expandable display in android.

谢谢

推荐答案

根据这个<一个href="http://www.allappsdevelopers.com/TopicDetail.aspx?TopicID=c991d70a-4570-4e4b-8378-2191a4247a84"相对=nofollow>例如。

   public View getChildView(int groupPosition, int childPosition,

                   boolean isLastChild, View convertView, ViewGroup parent) {

             CustExpListview SecondLevelexplv = new CustExpListview(Vincent_ThreeelevellistActivity.this);

             SecondLevelexplv.setAdapter(new SecondLevelAdapter());

             SecondLevelexplv.setGroupIndicator(null);

             return SecondLevelexplv;

      }

下面的 getChildView 方法创建一个新的适配器由 CustExpListview 类和集合是作为一个适配器。
用同样的方法,你可以创建一个新的 BaseExpandableListAdapter 类,并将其设置在 CustExpListview getChildView 方法。

Here the getChildView method creates a new adapter by CustExpListview Class and sets is as an Adapter.
The same way you can create a new BaseExpandableListAdapter Class and set it in CustExpListview Class getChildView method.

这篇关于n个电平扩展列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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