Skip to content

kaeawc/motion-hourglass

Repository files navigation

Motion Hourglass

Demonstration of several MotionLayout concepts and features working together:

  • Each ConstraintSet denotes the various states of the hourglass while keeping the vertical or horizontal chain packed.
  • Some Constraints are specifying a pathMotionArc to get the curved path of motion.
  • ImageFilterView is used with a CustomAttribute property transition on crossfade to change how the sand appears.
  • A simple rotation transformation keeps both the glass and sand rotating along their respective paths.
  • The sand is constrainted by the glass
  • KeyFrameSets adjust for alpha and rotation quirks to keep the ends of the animation from glitching
  • autoTransition starts the animation and keeps it going forever

About

MotionLayout hourglass animation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages