ImageFillType: { NORMAL: 0; STRETCH: 1; ASPECTFIT: 2; ASPECTFILL: 3; iOS: typeof ImageViewFillTypeIOS } = ...

UI.ImageView.FillType

Since

0.1 FillType is an enum. It defines the fill type of an UI.Image inside its parent.

Example

import ImageView from '@smartface/native/ui/imageview';
import Image from '@smartface/native/ui/image';

var myImage = Image.createFromFile("images://smartface.png")
var myImageView = new ImageView({
image: myImage,
imageFillType: ImageView.FillType.NORMAL,
width:200, height: 200
});
myPage.layout.addChild(myImageView);

Type declaration

  • Readonly NORMAL: 0

    Property

    Android

    Ios

    The source image will be displayed in its normal dimensions inside the parent.

    Static

    Android

    Ios

    Since

    0.1

  • Readonly STRETCH: 1

    Property

    Android

    Ios

    The source image will be stretched to the size of the parent.

    Static

    Android

    Ios

    Since

    0.1

  • Readonly ASPECTFIT: 2

    Property

    Android

    Ios

    The source image will grow by saving its aspect ratio until the image is at its max size inside the parent.

    Static

    Android

    Ios

    Since

    0.1

  • Readonly ASPECTFILL: 3

    Property

    Android

    Ios

    The option to scale the content to fill the size of the view. Some portion of the content may be clipped to fill the view’s bounds.

    Static

    Android

    Ios

    Since

    3.0.2

  • iOS: typeof ImageViewFillTypeIOS

Generated using TypeDoc