I will change LinearLayout from its original height to 0 using
ViewGroup.LayoutParams params = getLayoutParams(); params.height = newHeight; requestLayout();
Everything works, except newHeight = 0 - the layout height returns to its original height. How can i avoid this?
Setting visibility to GONE if newHeight == 0 does not help.
source share