From f8f7ff9a6bf709e967e704087f18f600e4a3d9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Wed, 13 Sep 2023 14:44:44 +0800 Subject: [PATCH] Android: implement extended scale type (fit start & fit end) --- .../doric/src/main/java/pub/doric/shader/ImageNode.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doric-android/doric/src/main/java/pub/doric/shader/ImageNode.java b/doric-android/doric/src/main/java/pub/doric/shader/ImageNode.java index beae02c1..6c5f2c64 100644 --- a/doric-android/doric/src/main/java/pub/doric/shader/ImageNode.java +++ b/doric-android/doric/src/main/java/pub/doric/shader/ImageNode.java @@ -484,6 +484,12 @@ public class ImageNode extends ViewNode { case 2: view.setScaleType(ImageView.ScaleType.CENTER_CROP); break; + case 4: + view.setScaleType(ImageView.ScaleType.FIT_START); + break; + case 5: + view.setScaleType(ImageView.ScaleType.FIT_END); + break; default: view.setScaleType(ImageView.ScaleType.FIT_XY); break;