Android: Set minimum height of a view programmatically
try this--->
siv.getLayoutParams().height = minHeight;
or u can also try--->
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(width , minHeight);
siv.setLayoutParams(layoutParams);
The answer by @Ashok Damani is incorrect as pointed out by @Gustavo Baiocchi Costa in the comments:
this sets the height or width not the minimum width or height
The correct method to set the minimum height of a view in Android:
Property access way(in Kotlin):
yourView.minimumHeight = minHeight
Setter method way:
yourView.setMinimumHeight(minHeight);
Android Documentation says:
Sets the minimum height of the view. It is not guaranteed the view will be able to achieve this minimum height (for example, if its parent layout constrains it with less available height).