public enum

LayoutElementProto.ContentScaleMode

extends java.lang.Enum<LayoutElementProto.ContentScaleMode>

 java.lang.Object

↳java.lang.Enum<LayoutElementProto.ContentScaleMode>

↳androidx.wear.protolayout.proto.LayoutElementProto.ContentScaleMode

Overview

 How content which does not match the dimensions of its bounds (e.g. an image
 resource being drawn inside an Image) will be resized to fit its bounds.
 
Protobuf enum androidx.wear.protolayout.proto.ContentScaleMode

Summary

Enum Constants
CONTENT_SCALE_MODE_CROP
 Content will be resized proportionally so it completely fills its bounds,
 and anything outside of the bounds will be cropped.
CONTENT_SCALE_MODE_FILL_BOUNDS
 Content will be resized to fill its bounds, without taking into account the
 aspect ratio.
CONTENT_SCALE_MODE_FIT
 Content will be scaled to fit inside its bounds, proportionally.
CONTENT_SCALE_MODE_UNDEFINED
 Content scaling is undefined.
UNRECOGNIZED
Fields
public static final intCONTENT_SCALE_MODE_CROP_VALUE

 Content will be resized proportionally so it completely fills its bounds,
 and anything outside of the bounds will be cropped.

public static final intCONTENT_SCALE_MODE_FILL_BOUNDS_VALUE

 Content will be resized to fill its bounds, without taking into account the
 aspect ratio.

public static final intCONTENT_SCALE_MODE_FIT_VALUE

 Content will be scaled to fit inside its bounds, proportionally.

public static final intCONTENT_SCALE_MODE_UNDEFINED_VALUE

 Content scaling is undefined.

Methods
public static LayoutElementProto.ContentScaleModeforNumber(int value)

public final intgetNumber()

public static <any>internalGetValueMap()

public static com.google.protobuf.Internal.EnumVerifierinternalGetVerifier()

public static LayoutElementProto.ContentScaleModevalueOf(int value)

public static LayoutElementProto.ContentScaleModevalueOf(java.lang.String name)

public static LayoutElementProto.ContentScaleModevalues()

from java.lang.Enum<E>clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
from java.lang.ObjectgetClass, notify, notifyAll, wait, wait, wait

Enum Constants

CONTENT_SCALE_MODE_UNDEFINED

 Content scaling is undefined.
 
CONTENT_SCALE_MODE_UNDEFINED = 0;

CONTENT_SCALE_MODE_FIT

 Content will be scaled to fit inside its bounds, proportionally. As an
 example, If a 10x5 image was going to be drawn inside a 50x50 Image
 element, the actual image resource would be drawn as a 50x25 image,
 centered within the 50x50 bounds.
 
CONTENT_SCALE_MODE_FIT = 1;

CONTENT_SCALE_MODE_CROP

 Content will be resized proportionally so it completely fills its bounds,
 and anything outside of the bounds will be cropped. As an example, if a
 10x5 image was going to be drawn inside a 50x50 Image element, the image
 resource would be drawn as a 100x50 image, centered within its bounds (and
 with 25px cropped from both the left and right sides).
 
CONTENT_SCALE_MODE_CROP = 2;

CONTENT_SCALE_MODE_FILL_BOUNDS

 Content will be resized to fill its bounds, without taking into account the
 aspect ratio. If a 10x5 image was going to be drawn inside a 50x50 Image
 element, the image would be drawn as a 50x50 image, stretched vertically.
 
CONTENT_SCALE_MODE_FILL_BOUNDS = 3;

UNRECOGNIZED

Fields

public static final int CONTENT_SCALE_MODE_UNDEFINED_VALUE

 Content scaling is undefined.
 
CONTENT_SCALE_MODE_UNDEFINED = 0;

public static final int CONTENT_SCALE_MODE_FIT_VALUE

 Content will be scaled to fit inside its bounds, proportionally. As an
 example, If a 10x5 image was going to be drawn inside a 50x50 Image
 element, the actual image resource would be drawn as a 50x25 image,
 centered within the 50x50 bounds.
 
CONTENT_SCALE_MODE_FIT = 1;

public static final int CONTENT_SCALE_MODE_CROP_VALUE

 Content will be resized proportionally so it completely fills its bounds,
 and anything outside of the bounds will be cropped. As an example, if a
 10x5 image was going to be drawn inside a 50x50 Image element, the image
 resource would be drawn as a 100x50 image, centered within its bounds (and
 with 25px cropped from both the left and right sides).
 
CONTENT_SCALE_MODE_CROP = 2;

public static final int CONTENT_SCALE_MODE_FILL_BOUNDS_VALUE

 Content will be resized to fill its bounds, without taking into account the
 aspect ratio. If a 10x5 image was going to be drawn inside a 50x50 Image
 element, the image would be drawn as a 50x50 image, stretched vertically.
 
CONTENT_SCALE_MODE_FILL_BOUNDS = 3;

Methods

public static LayoutElementProto.ContentScaleMode valueOf(java.lang.String name)

public final int getNumber()

public static LayoutElementProto.ContentScaleMode valueOf(int value)

Deprecated: Use LayoutElementProto.ContentScaleMode.forNumber(int) instead.

Parameters:

value: The number of the enum to look for.

Returns:

The enum associated with the given number.

public static LayoutElementProto.ContentScaleMode forNumber(int value)

public static <any> internalGetValueMap()

public static com.google.protobuf.Internal.EnumVerifier internalGetVerifier()