-
- 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 final Stringnameprivate Integervalueprivate final <ERROR CLASS>valueFlowprivate final BooleanhasCppObjectprivate AtomicIntegerrefsprivate LongcppPointerprivate final List<RefCount>dependenciesprivate final IntegerrefCount
-
Constructor Summary
Constructors Constructor Description ViewModelColorProperty(Long unsafeCppPointer)
-
Method Summary
Modifier and Type Method Description final StringgetName()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 List<RefCount>getDependencies()IntegergetRefCount()-
Methods inherited from class app.rive.runtime.kotlin.core.ViewModelColorProperty
cppHasChanged, cppName -
Methods inherited from class app.rive.runtime.kotlin.core.ViewModelProperty
acquire, cppDelete, release -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
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 List<RefCount> getDependencies()
-
getRefCount
Integer getRefCount()
-
-
-
-