SizeSerializer



A serializer for Size. This serializer uses SavedState's API directly to save/load a Size.

Note that this serializer should be used with SavedStateEncoder or SavedStateDecoder only. Using it with other Encoders/Decoders may throw IllegalArgumentException.

import androidx.savedstate.serialization.serializers.SizeSerializer

@Serializable
data class MyModel(@Serializable(with = SizeSerializer::class) val size: android.util.Size)

Summary

Public constructors

android

Public functions

open Size
deserialize(decoder: Decoder)
android
open Unit
serialize(encoder: Encoder, value: Size)
android

Public properties

open SerialDescriptor
android

Public constructors

SizeSerializer

SizeSerializer()

Public functions

deserialize

open fun deserialize(decoder: Decoder): Size

serialize

open fun serialize(encoder: Encoder, value: Size): Unit

Public properties

descriptor

open val descriptorSerialDescriptor