public final class

ColorBuilders.ColorStop

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.ColorBuilders.ColorStop

Overview

A color and an offset, determining a color position in a gradient.

Summary

Methods
public static ColorBuilders.ColorStopfromProto(ColorProto.ColorStop proto, Fingerprint fingerprint)

Creates a new wrapper instance from the proto.

public ColorBuilders.ColorPropgetColor()

Gets the color for this stop.

public FingerprintgetFingerprint()

Get the fingerprint for this object, or null if unknown.

public TypeBuilders.FloatPropgetOffset()

Gets the relative offset for this color, between 0 and 1.

public ColorProto.ColorStoptoProto()

Returns the internal proto instance.

public java.lang.StringtoString()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Methods

public ColorBuilders.ColorProp getColor()

Gets the color for this stop. Only opaque colors are supported. Any transparent colors will have their alpha component set to 0xFF (opaque).

public TypeBuilders.FloatProp getOffset()

Gets the relative offset for this color, between 0 and 1. This determines where the color is positioned relative to a gradient space.

public Fingerprint getFingerprint()

Get the fingerprint for this object, or null if unknown.

public static ColorBuilders.ColorStop fromProto(ColorProto.ColorStop proto, Fingerprint fingerprint)

Creates a new wrapper instance from the proto.

public ColorProto.ColorStop toProto()

Returns the internal proto instance.

public java.lang.String toString()