@@ -113,6 +113,7 @@ public abstract class TiUIView implements KrollProxyListener, OnFocusChangeListe
113113 protected TiBackgroundDrawable background ;
114114 private int minWidth = -1 ;
115115 private int maxWidth = -1 ;
116+ private int minHeight = -1 ;
116117 private int maxHeight = -1 ;
117118
118119 public TiBackgroundDrawable getBackground ()
@@ -793,6 +794,8 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP
793794 setMinWidth (newValue , hasBorder (proxy .getProperties ()));
794795 } else if (key .equals ("maxHeight" )) {
795796 setMaxHeight (newValue , hasBorder (proxy .getProperties ()));
797+ } else if (key .equals ("minHeight" )) {
798+ setMinHeight (newValue , hasBorder (proxy .getProperties ()));
796799 } else if (key .equals (TiC .PROPERTY_VISIBLE )) {
797800 newValue = (newValue == null ) ? false : newValue ;
798801 this .setVisibility (TiConvert .toBoolean (newValue ) ? View .VISIBLE : View .INVISIBLE );
@@ -1072,6 +1075,9 @@ public void processProperties(KrollDict d)
10721075 if (d .containsKey ("maxHeight" )) {
10731076 setMaxHeight (d .get ("maxHeight" ), hasBorder (d ));
10741077 }
1078+ if (d .containsKey ("minHeight" )) {
1079+ setMinHeight (d .get ("minHeight" ), hasBorder (d ));
1080+ }
10751081 initializeBorder (d , bgColor );
10761082
10771083 if (d .containsKey (TiC .PROPERTY_OPACITY ) && !nativeViewNull ) {
@@ -1205,6 +1211,20 @@ private void setMaxHeight(Object value, Boolean hasBorder)
12051211 Log .w (TAG , "You can only use maxHeight for Views without borders" );
12061212 }
12071213 }
1214+ private void setMinHeight (Object value , Boolean hasBorder )
1215+ {
1216+ minHeight = -1 ;
1217+ if (value != null ) {
1218+ minHeight = TiConvert .toTiDimension (TiConvert .toInt (value ),
1219+ TiDimension .TYPE_HEIGHT ).getAsPixels (nativeView );
1220+ }
1221+
1222+ if (!hasBorder ) {
1223+ ((TiCompositeLayout ) nativeView ).setMinHeight (minHeight );
1224+ } else {
1225+ Log .w (TAG , "You can only use maxHeight for Views without borders" );
1226+ }
1227+ }
12081228
12091229 private void setAnchor (HashMap point )
12101230 {
0 commit comments