Android: implement extended scale type (fit start & fit end)

This commit is contained in:
王劲鹏 2023-09-13 14:44:44 +08:00 committed by osborn
parent 638f942738
commit f8f7ff9a6b

View File

@ -484,6 +484,12 @@ public class ImageNode extends ViewNode<ImageView> {
case 2: case 2:
view.setScaleType(ImageView.ScaleType.CENTER_CROP); view.setScaleType(ImageView.ScaleType.CENTER_CROP);
break; break;
case 4:
view.setScaleType(ImageView.ScaleType.FIT_START);
break;
case 5:
view.setScaleType(ImageView.ScaleType.FIT_END);
break;
default: default:
view.setScaleType(ImageView.ScaleType.FIT_XY); view.setScaleType(ImageView.ScaleType.FIT_XY);
break; break;