The 0 is not the problem.

You have a group with no children, and that's quite logical, because that's exactly the case you are trying to customize (hide the group indicator).

The problem is the code executed in that case, under the "if":

"indicator.setVisibility(View.INVISIBLE)".

I believe that "indicator" is null.

Which is also quite logical, because ExpandableListView doesn't use a view to draw the indicators (either group or child), it directly draws Drawable objects on top of any children or group items.

Where does the "indicator" in your code come from? What is its value in the code you posted, is it null?

-- Kostya

29.06.2011 16:50, juliagrig пишет:
  indicator is an imageview.Then , I tried to set the visibility of
this image depending on the number of children. But when I debug the
  "if( getChildrenCount( groupPosition )==0) {
   indicator.setVisibility( View.INVISIBLE );. " the app  crashes. The
"0" is the problem, beacause when I turn it to another number it works
perfectly.
Thanks for your answer.

--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to