-
- All Implemented Interfaces:
-
app.rive.runtime.kotlin.core.RefCount
public final class ViewModelColorProperty extends ViewModelProperty<Int>
A color property of a ViewModelInstance. Values are represented as integers in 0xAARRGGBB format.
The Android Color class is not available prior to API 26, and because this library has minSDK 21, we use integers. If you are using API 26+, you can convert to Color with Color.valueOf and to an Int with Color.toArgb. If you are supporting prior to API 26, you can still use Color.argb to handle the bit manipulations.
-
-
Field Summary
Fields Modifier and Type Field Description private Integervalueprivate final <ERROR CLASS>valueFlowprivate final BooleanhasCppObjectprivate AtomicIntegerrefsprivate LongcppPointerprivate final <ERROR CLASS>dependenciesprivate final IntegerrefCount
-
Constructor Summary
Constructors Constructor Description ViewModelColorProperty(Long unsafeCppPointer)
-
Method Summary
Modifier and Type Method Description final IntegergetValue()final UnitsetValue(Integer value)final <ERROR CLASS>getValueFlow()A flow of the property's value. final BooleangetHasCppObject()final AtomicIntegergetRefs()final UnitsetRefs(AtomicInteger refs)final LonggetCppPointer()final UnitsetCppPointer(Long cppPointer)final <ERROR CLASS>getDependencies()IntegergetRefCount()-
-
Constructor Detail
-
ViewModelColorProperty
ViewModelColorProperty(Long unsafeCppPointer)
-
-
Method Detail
-
getValueFlow
final <ERROR CLASS> getValueFlow()
A flow of the property's value. Use for observing changes.
-
getHasCppObject
final Boolean getHasCppObject()
-
getRefs
final AtomicInteger getRefs()
-
setRefs
final Unit setRefs(AtomicInteger refs)
-
getCppPointer
final Long getCppPointer()
-
setCppPointer
final Unit setCppPointer(Long cppPointer)
-
getDependencies
final <ERROR CLASS> getDependencies()
-
getRefCount
Integer getRefCount()
-
-
-
-