Using Phonebot display properties

From EtherWiki
Revision as of 09:18, 28 April 2012 by Sstrader (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Image properties are available for the image control which can display an image either from a URL or from the local file system.

The image can be stored in the following ways:

Name Value Description
Link link Always display the image located at the URL or directory.
Link with copy link_copy Display the linked image and store a local copy If the image is no longer available, the copy will be displayed.
Copy copy Always use a local copy.

The image can be scaled with the following methods:

Name Value Description
Center center Center the image in the view, but perform no scaling.
Center crop center_crop Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding).
Center inside center_inside Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).
Fit center fit_center Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst. At least one axis (X or Y) will fit exactly. The result is centered inside dst.
Fit end fit_end Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst. At least one axis (X or Y) will fit exactly. END aligns the result to the right and bottom edges of dst.
Fit start fit_start Compute a scale that will maintain the original src aspect ratio, but will also ensure that src fits entirely inside dst. At least one axis (X or Y) will fit exactly. START aligns the result to the left and top edges of dst.
Fit XY fit_xy Scale in X and Y independently, so that src matches dst exactly. This may change the aspect ratio of the src.

--ImageView.ScaleType

--Matrix.ScaleToFit