{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

MagnifierStyle

@ExperimentalFoundationApi
public final class MagnifierStyle


Specifies how a magnifier should create the underlying Magnifier widget. These properties should not be changed while a magnifier is showing, since the magnifier will be dismissed and recreated with the new properties which will cause it to disappear for at least a frame.

Not all magnifier features are supported on all platforms. The isSupported property will return false for styles that cannot be fully supported on the given platform.

Summary

Nested types

public static class MagnifierStyle.Companion

Public constructors

@ExperimentalFoundationApi
MagnifierStyle(
    @NonNull DpSize size,
    @NonNull Dp cornerRadius,
    @NonNull Dp elevation,
    boolean clippingEnabled,
    boolean fishEyeEnabled
)

Public methods

boolean
equals(Object other)
int
final boolean

Returns true if this style is supported by this version of the platform.

@NonNull String

Public constructors

MagnifierStyle

@ExperimentalFoundationApi
public MagnifierStyle(
    @NonNull DpSize size,
    @NonNull Dp cornerRadius,
    @NonNull Dp elevation,
    boolean clippingEnabled,
    boolean fishEyeEnabled
)

Public methods

equals

public boolean equals(Object other)

hashCode

public int hashCode()

isSupported

public final boolean isSupported()

Returns true if this style is supported by this version of the platform. When false is returned, it may be either because the Magnifier widget is not supported at all because the platform is too old, or because a particular style flag (e.g. fishEyeEnabled) is not supported on the current platform. Default and TextDefault styles are supported on all platforms with SDK version 28 and higher.

toString

public @NonNull String toString()