Reactive motion for Android. Deprecated; please use the Motion library in Material Components for Android instead: https://material.io/develop/android/theming/motion/.
[x] Replace every existing instance of ReactiveProperty.of(view, property) with runtime.get(view).property()
[ ] Tests
In the future, we may genericize this API to support properties that are not just on Views. This is not yet spec'd and will require careful type considerations, so it's recommended to only add View support first.
[ ] Optional: A ReactiveObject<T> class
[ ] Optional: A MotionRuntime.get(T) method that takes in a T and returns a ReactiveObject<T> instance.
[ ] Optional: ReactiveObject<T> needs a way to define methods for the properties of that object. This requires further research.
https://material-motion.github.io/material-motion/starmap/specifications/runtime/MotionRuntime-get
Create a
runtime.get(view).property()
syntactic sugar for the existingReactiveProperty.of(view, property)
API. The requirements are:ReactiveView
classMotionRuntime.get(View)
method that takes in aView
and returns aReactiveView
instance.ReactiveView
should contain methods for every property defined in View like https://developer.android.com/reference/android/view/View.html#TRANSLATION_XReactiveView
should contain methods for every custom property defined in ViewProperties https://github.com/material-motion/material-motion-android/blob/develop/library/src/main/java/com/google/android/material/motion/properties/ViewProperties.javaReactiveProperty.of(view, property)
withruntime.get(view).property()
In the future, we may genericize this API to support properties that are not just on Views. This is not yet spec'd and will require careful type considerations, so it's recommended to only add View support first.
ReactiveObject<T>
classMotionRuntime.get(T)
method that takes in aT
and returns aReactiveObject<T>
instance.ReactiveObject<T>
needs a way to define methods for the properties of that object. This requires further research.