MobileUI
/
ImageView
Displays an arbitrary image.
iOS | Android |
Usage
Use a JPEG from the assets folder
<ImageView href="img/landscape.jpg" />
Use an image from the web
<ImageView href="#{'https://example.com/great-image.jpg'}" scaleType="centerCrop"/>
Attributes
Name | Type | Default | Binding | Description |
---|---|---|---|---|
Inherits all attributes from View and adds the following: | ||||
href | URI | output | The link to the image file. This can be a local bitmap (png, jpeg). | |
maxWidth | sizeType | output | Makes the view be at most this wide. | |
maxHeight | sizeType | output | Makes the view be at most this tall. | |
scaleType | enum | platform-default | output | Controls how the image should be resized or moved to match the size of this ImageView. Allowed values: fitXY, fitStart, fitCenter, fitEnd, center, centerCrop and centerInside. Please refer to Amanda Hill’s Android ImageView ScaleType: A Visual Guide for more information. |
Parts of this documentation are a derivate of the Android Developer Documentation by Google used under CC-BY-2.5.