Resizing Tabbar with subtabbar


I was checking this question: … adjustSize

I have the same problem but there is a little difference. My tabbar is inside another tabbar.

The width of main tab is fixed but the height must change dynamically with the height of the subtab content.

So, I need to set the main and subtab height to subtab content height.

How could I do that?

Thanks a lot.

You can use same code as in above sample, attached to both tabbar, with small addition to logic of inner tabbar

var box=this._content[id];
if (!box) return;“1px”;
var y=box.scrollHeight+10;“100%”;
parent_tabbar._onsel(); //trigger the same logic of parent tabbar
return true;

in such case, after child tabbar updates its sizes, it will force update of parent tabbar