jjzjj

BaseExpandableListAdapter

全部标签

Android 扩展 BaseExpandableListAdapter

我正在尝试扩展BaseExpandableListAdapter,但是当我查看列表并选择要扩展的元素之一时,列表的顺序会反转。例如,如果我有一个包含4个元素的列表并选择第1个元素,则顺序(从上到下)现在为4、3、2、1,第4个元素(现在位于顶部)展开。如果我展开第4个元素,顺序将恢复为1、2、3、4,没有展开的元素。这是我的实现:公共(public)类SensorExpandableAdapter扩展BaseExpandableListAdapter{privatestaticfinalintFILTER_POSITION=0;privatestaticfinalintFUNCTION

android - 将变量值从 BaseExpandableListAdapter 类转移到新 Activity

我有以下扩展到BaseExpandableListAdapter的ExtendableListAdapter类的代码。我正在尝试将字符串变量“FullTrainsURL”的值传输到新Activity。正如您在代码中看到的那样,每个子列表项的URL值都是不同的,并且使用OnClick()函数附加了特定代码。我试过了Intenti=newIntent(AdapterForStations.this,TestMain.class);Bundleb=newBundle();b.putString("url",fullTrainsURL);i.putExtras(b);startActivity

android - 如何禁用 BaseExpandableListAdapter 中某些项目的扩展

我想禁用ExpandableListView中某些项目的可扩展性.到目前为止,我知道可以通过ExpandableListView来完成但我认为控制要显示的内容/为什么/不从ListView显示的内容并不好-此任务属于适配器,我想禁用可扩展性。那么如何从扩展BaseExpandableListAdapter的类中做到这一点??到目前为止,我已经尝试将convertView可见性设置为View.GONE但它不起作用(即它显示了一些奇怪的View,空的但不是查看.GONE)@OverridepublicViewgetChildView(intgroupPosition,intchildPos

android - 当我在 EditText 中编辑数据时,BaseExpandableListAdapter 调用 getgroupview()

我在Android中使用ExpandableListView。我有一个对话框使这个View膨胀:对于getgroupview()方法,我的BaseExpandableListAdapter看起来像这样:publicViewgetGroupView(intgroupPosition,booleanisExpanded,ViewconvertView,ViewGroupparent){Viewrow=convertView;ViewHolderholder=null;Log.d("LIST","getGroupView()groupPosition"+groupPosition+"isEx