@@ -113,6 +113,7 @@ public abstract class TiUIView implements KrollProxyListener, OnFocusChangeListe
113
113
protected TiBackgroundDrawable background ;
114
114
private int minWidth = -1 ;
115
115
private int maxWidth = -1 ;
116
+ private int minHeight = -1 ;
116
117
private int maxHeight = -1 ;
117
118
118
119
public TiBackgroundDrawable getBackground ()
@@ -793,6 +794,8 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP
793
794
setMinWidth (newValue , hasBorder (proxy .getProperties ()));
794
795
} else if (key .equals ("maxHeight" )) {
795
796
setMaxHeight (newValue , hasBorder (proxy .getProperties ()));
797
+ } else if (key .equals ("minHeight" )) {
798
+ setMinHeight (newValue , hasBorder (proxy .getProperties ()));
796
799
} else if (key .equals (TiC .PROPERTY_VISIBLE )) {
797
800
newValue = (newValue == null ) ? false : newValue ;
798
801
this .setVisibility (TiConvert .toBoolean (newValue ) ? View .VISIBLE : View .INVISIBLE );
@@ -1072,6 +1075,9 @@ public void processProperties(KrollDict d)
1072
1075
if (d .containsKey ("maxHeight" )) {
1073
1076
setMaxHeight (d .get ("maxHeight" ), hasBorder (d ));
1074
1077
}
1078
+ if (d .containsKey ("minHeight" )) {
1079
+ setMinHeight (d .get ("minHeight" ), hasBorder (d ));
1080
+ }
1075
1081
initializeBorder (d , bgColor );
1076
1082
1077
1083
if (d .containsKey (TiC .PROPERTY_OPACITY ) && !nativeViewNull ) {
@@ -1205,6 +1211,20 @@ private void setMaxHeight(Object value, Boolean hasBorder)
1205
1211
Log .w (TAG , "You can only use maxHeight for Views without borders" );
1206
1212
}
1207
1213
}
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
+ }
1208
1228
1209
1229
private void setAnchor (HashMap point )
1210
1230
{
0 commit comments