Hi,
I posted this on another forum it might be of help and you might be
able to answer questions!!

Very pleased  :) with the way ExpandableListView works but am unclear
how to set the clicked view as invalid.

In the onChildClick(ExpandableListView parent, View v, int
groupPosition, int childPosition, long id)
{
I call the Dialog "Enter" and wait for dismiss so:-

Value = new Value_Input(test2.this,0, custno, itemno, day);
            Value.show();
            Value.setOnDismissListener(new OnDismissListener() {
            public void onDismiss(DialogInterface arg0) {
                getExpandableListView().invalidateViews();
            }
            });
}

the invalidateViews() seems a bit heavyweight when I only want to
redraw the clicked view.
(it also has side effects (mine) which I want to avoid. )  :(

the other options are:-

getExpandableListView().invalidate();
getExpandableListView().invalidate(dirty);
getExpandableListView().invalidate(l, t, r, b)
getExpandableListView().invalidateChild(child, dirty)
getExpandableListView().invalidateChildInParent(location, dirty)
getExpandableListView().invalidateDrawable(drawable)

basically how do I get from groupPosition, childPosition to the View
after the event??
or how to use one of the above??

any suggestions would gratefully received!!

Steve

Alas there is more - I have a command to expand the group and move it
to the top of the display:-

            case 1:// "Move to Top")
                    getExpandableListView().setSelectedGroup(groupPosition);
                    getExpandableListView().expandGroup(groupPosition);
                    getExpandableListView().invalidateViews();
                    break;

This does not cause the children to be redrawn indeed there is no
subsequent call to getChildrenCount(int groupPosition)

getExpandableListView().setSelectedGroup(groupPosition); <- I was
hoping this might move group to top of screen!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to