I have a small problem with my ExpanableListView, it has 4 levels. 1.- dates 2.- Locations 3.- Streets 4.- Lots
When I want to expand the fourth level this is not shown. Use, according to guides, the onMeasure method as follows:
public SecondLevelExpandableListView(Context context) {
super(context);
}
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
/*
* Adjust height
*/
heightMeasureSpec = MeasureSpec.makeMeasureSpec(99999, MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
but the following happens to me:
I know that the list of lots (fourth level) is, because if I change the property "AT_MOST" to "EXACTLY" it shows me the fourth level without problems, but with an exaggerated and fixed height.
public SecondLevelExpandableListView(Context context) {
super(context);
}
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
/*
* Adjust height
*/
heightMeasureSpec = MeasureSpec.makeMeasureSpec(500, MeasureSpec.EXACTLY);
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
The height must be dynamic, since I do not know the number of lots (fourth level) will have each street (third level).
Thank you in advance