ExpandableListView Items not clickable after scroll

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

ExpandableListView Items not clickable after scroll

Postby milkround » Thu Sep 03, 2009 11:52 am

Hi folks,

I am working on an ExpandableListView.
It works with a context menu on groups and children are clickable. It works in touch mode.

It all works fine until I scroll the current set of views (all the ones created on and off screen)
off the screen were upon I can select neither groups nor children in touch mode.

After trying to select a group (or child) in touch mode.... when
I roll the track ball the smallest amount the group/child I tried to select becomes selected and all
views within the created view set also become selectable.

Any ideas?? What am I doing wrong.

Steve
milkround
Developer
Developer
 
Posts: 34
Joined: Sat May 02, 2009 2:29 pm
Location: UK & Malta

Top

Postby milkround » Mon Sep 07, 2009 3:34 pm

Hi,

I have the answer - I have been using

getExpandableListView().expandGroup(groupPosition);

within the getGroupView method to provide a "default expanded" group view.

The above behaviour is atributable to this line of code.

There appears to be no way to force this default from within the Adapter other than using

int nogroup=mAdapter.getGroupCount();
for (int n=0;n<nogroup;n++)
getExpandableListView().expandGroup(n);

After creation of the expandablelistview.

This however has side effects requiring a full traverse of the data set (I have 1033 groups) and takes a very long time.

Does anyone know of a better approach to providing the default expanded view required??

Steve
milkround
Developer
Developer
 
Posts: 34
Joined: Sat May 02, 2009 2:29 pm
Location: UK & Malta

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests