Android:imageview support maxWidth and maxHeight
This commit is contained in:
		@@ -68,6 +68,19 @@ public class ImageNode extends ViewNode<ImageView> {
 | 
				
			|||||||
        super(doricContext);
 | 
					        super(doricContext);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    protected void blendLayoutConfig(JSObject jsObject) {
 | 
				
			||||||
 | 
					        super.blendLayoutConfig(jsObject);
 | 
				
			||||||
 | 
					        JSValue maxWidth = jsObject.getProperty("maxWidth");
 | 
				
			||||||
 | 
					        if (maxWidth.isNumber()) {
 | 
				
			||||||
 | 
					            mView.setMaxWidth(DoricUtils.dp2px(maxWidth.asNumber().toFloat()));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        JSValue maxHeight = jsObject.getProperty("maxHeight");
 | 
				
			||||||
 | 
					        if (maxHeight.isNumber()) {
 | 
				
			||||||
 | 
					            mView.setMaxHeight(DoricUtils.dp2px(maxWidth.asNumber().toFloat()));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    protected ImageView build() {
 | 
					    protected ImageView build() {
 | 
				
			||||||
        ImageView imageView = new ImageView(getContext());
 | 
					        ImageView imageView = new ImageView(getContext());
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user