ImageFill
Stay organized with collections
Save and categorize content based on your preferences.
Possible image display options for affecting the presentation of the image. This should be used for when the image's aspect ratio does not match the image container's aspect ratio.
Enums |
UNSPECIFIED |
ImageFill unspecified. |
GRAY |
Fill the gaps between the image and the image container with gray bars. |
WHITE |
Fill the gaps between the image and the image container with white bars. |
CROPPED |
Image is scaled such that the image width and height match or exceed the container dimensions. This may crop the top and bottom of the image if the scaled image height is greater than the container height, or crop the left and right of the image if the scaled image width is greater than the container width. This is similar to "Zoom Mode" on a widescreen TV when playing a 4:3 video. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["Image display options control how an image is presented within its container, especially when aspect ratios differ."],["Options include filling the surrounding space with gray or white bars or cropping the image to fit."],["`CROPPED` scales the image to fill the container, potentially cropping parts that extend beyond its boundaries, similar to \"Zoom Mode\" on a widescreen TV."],["Developers can choose an option to optimize image presentation based on the specific needs of their website or application."]]],[]]