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

Problem One
-------------------

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.

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??

What I  need is:-

                  getExpandableListView().invalidateChild
( groupPosition, childPosition)

Problem Two
------------------

How do I get the adapter not to draw GONE views.  I have tried the
trick I used in the simple BaseAdapter in both getGroupView and
getChildView but it does not work :-

                boolean found=false;
                int count = getExpandableListView().getChildCount();
                for(int i=0;i<count;i++){
                        View block2 = 
(View)getExpandableListView().getChildAt(i);
                        if (block2.getVisibility()==View.GONE){
                            found=true;
                        }
                }
                if (found){
                        getExpandableListView().forceLayout();
                        getExpandableListView().getParent().requestLayout();
                        getExpandableListView().invalidateViews();
                }

What do I do???  Why doesn't the adapter look after this for me??

I would argue that both of the above problems currently require the
user to have an understanding of what is going on inside the adapter
other than the basics. (dangerous)  Or am I missing something basic??

Many thanks in advance
Steve



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

Reply via email to