質問

I have ListView with 10 elements, and the last element is ExpandableListView, but when I click on the last element to expand, it doesn't expand at all, i can see only one child item where as there should be at least 5 child elements.

I tried to set layout height dynamically, but i don't know how to get real children items height.

Thanks in advance!

役に立ちましたか?

解決

Do you mean you have an ExpandableListView inside a ListView? If so, I don't think it is how it should be done. What you should have is only an ExpandableListView with an ExpandableListAdapter that only return child for your 10th element. I think the documentation ( http://developer.android.com/reference/android/widget/ExpandableListAdapter.html ) explains pretty well how to create such an Adapter, but in case you need it I could paste an example.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top