mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix: Images have margin when added to Layout
Resolves https://github.com/NativeScript/NativeScript/issues/1425
This commit is contained in:
@@ -73,8 +73,8 @@ public class ImageView extends android.widget.ImageView {
|
||||
|
||||
if (measureWidth != 0 && measureHeight != 0 && (finiteWidth || finiteHeight)) {
|
||||
this.computeScaleFactor(width, height, finiteWidth, finiteHeight, measureWidth, measureHeight);
|
||||
int resultW = (int) Math.floor(measureWidth * this.scaleW);
|
||||
int resultH = (int) Math.floor(measureHeight * this.scaleH);
|
||||
int resultW = (int) Math.round(measureWidth * this.scaleW);
|
||||
int resultH = (int) Math.round(measureHeight * this.scaleH);
|
||||
|
||||
measureWidth = finiteWidth ? Math.min(resultW, width) : resultW;
|
||||
measureHeight = finiteHeight ? Math.min(resultH, height) : resultH;
|
||||
|
||||
Reference in New Issue
Block a user