Class MaterialIcon (2.39.1)

public final class MaterialIcon extends GeneratedMessageV3 implements MaterialIconOrBuilder

A Google Material Icon, which includes over 2500+ options.

For example, to display a checkbox icon with customized weight and grade, write the following:

<code><code> { "name": "check_box", "fill": true, "weight": 300, "grade": -25 } </code></code>

Google Chat apps:

Protobuf type google.apps.card.v1.MaterialIcon

Static Fields

FILL_FIELD_NUMBER

public static final int FILL_FIELD_NUMBER
Field Value
Type Description
int

GRADE_FIELD_NUMBER

public static final int GRADE_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

WEIGHT_FIELD_NUMBER

public static final int WEIGHT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static MaterialIcon getDefaultInstance()
Returns
Type Description
MaterialIcon

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static MaterialIcon.Builder newBuilder()
Returns
Type Description
MaterialIcon.Builder

newBuilder(MaterialIcon prototype)

public static MaterialIcon.Builder newBuilder(MaterialIcon prototype)
Parameter
Name Description
prototype MaterialIcon
Returns
Type Description
MaterialIcon.Builder

parseDelimitedFrom(InputStream input)

public static MaterialIcon parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
MaterialIcon
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static MaterialIcon parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MaterialIcon
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static MaterialIcon parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
MaterialIcon
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static MaterialIcon parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MaterialIcon
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static MaterialIcon parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
MaterialIcon
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static MaterialIcon parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MaterialIcon
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static MaterialIcon parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
MaterialIcon
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static MaterialIcon parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MaterialIcon
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static MaterialIcon parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
MaterialIcon
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static MaterialIcon parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MaterialIcon
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static MaterialIcon parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
MaterialIcon
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static MaterialIcon parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MaterialIcon
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<MaterialIcon> parser()
Returns
Type Description
Parser<MaterialIcon>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public MaterialIcon getDefaultInstanceForType()
Returns
Type Description
MaterialIcon

getFill()

public boolean getFill()

Whether the icon renders as filled. Default value is false.

To preview different icon settings, go to Google Font Icons and adjust the settings under Customize.

bool fill = 2;

Returns
Type Description
boolean

The fill.

getGrade()

public int getGrade()

Weight and grade affect a symbol’s thickness. Adjustments to grade are more granular than adjustments to weight and have a small impact on the size of the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If any other value is specified, the default value is used.

To preview different icon settings, go to Google Font Icons and adjust the settings under Customize.

int32 grade = 4;

Returns
Type Description
int

The grade.

getName()

public String getName()

The icon name defined in the Google Material Icon, for example, check_box. Any invalid names are abandoned and replaced with empty string and results in the icon failing to render.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The icon name defined in the Google Material Icon, for example, check_box. Any invalid names are abandoned and replaced with empty string and results in the icon failing to render.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<MaterialIcon> getParserForType()
Returns
Type Description
Parser<MaterialIcon>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getWeight()

public int getWeight()

The stroke weight of the icon. Choose from {100, 200, 300, 400, 500, 600, 700}. If absent, default value is 400. If any other value is specified, the default value is used.

To preview different icon settings, go to Google Font Icons and adjust the settings under Customize.

int32 weight = 3;

Returns
Type Description
int

The weight.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public MaterialIcon.Builder newBuilderForType()
Returns
Type Description
MaterialIcon.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected MaterialIcon.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
MaterialIcon.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public MaterialIcon.Builder toBuilder()
Returns
Type Description
MaterialIcon.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException