ExpandableLayout
ExpandableLayout copied to clipboard
ExpandableLinearLayout does not work as expected after adding view programatically
ExpandableLinearLayout does not work after adding view programatically
If Programatically we would call :
getLayoutInflater().inflate(R.layout.partial, expandable, true);
then Expanding will not work properly.
If using expandable.initLayout(true); then there are 2 cases:
- If Layout is collapsed during inflate and calling initLayout - Expand will not work at all
- If Layout is expanded during inflate and calling initLayout - Expand will work, but last item will not be visibile. This is caused by
getMeasuredHeight() == 0
If not using expandable.initLayout(true); then last item is also not visible. (due the isCalculatedSize == true)