How to display more than 3- levels of expandable List View?

后端 未结 4 1221
天命终不由人
天命终不由人 2020-11-28 05:31

How to display more than 3- level of expandable list view, I am getting only examples for 3-Levels expandable.

Referring this :three-level-expandable-list

In

4条回答
  •  悲&欢浪女
    2020-11-28 05:55

    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) 
    {
        // 999999 is a size in pixels. 
        // ExpandableListView requires a maximum height in order to do measurement calculations.
        heightMeasureSpec = MeasureSpec.makeMeasureSpec(999999, MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }
    

    this makes much more reasonable length.

提交回复
热议问题