This is a major milestone release of Rhythm library that marks a change in its mission. With Material Cue being the primary development effort now, Rhythm steps down from being the promoted way for developers to verify their designs.
Instead, Rhythm embraces a new role of being an engine for rendering overlays. This means that rather than being a keyline tool itself, Rhythm will now focus on its sole concern of allowing to draw design overlays easily, i.e. converting simple human-readable config into something drawable. And then there will be other tools depending on Rhythm that will take care of the rest, managing overlays and displaying them to a user (be it Material Cue or something else).
Yes, Material Cue now uses Rhythm as a dependency, meaning the latter is now the former’s open core. This way all rendering engine improvements will go to Rhythm and be immediately available as open source, and Material Cue will focus on «the chrome» (end user convenience features).
With all that in mind, there has been substantial (hopefully final) structural changes, as well as some new functionality, all listed below. Please read notes on migrating and evaluate before updating.
Key changes
-
Rhythm is now split in two parts: Rhythm Core for rendering pipeline (turning DSL into Drawables), which is a reusable part, and Rhythm Control for what has been the previous primary focus (the notification, Rhythm groups,
RhythmFrameLayout
etc).See the readme for details on this separation.
-
Variable support! Now you can define global and local variables and use them in the overlays. Moreover, you can use magic variables to configure layer defaults.
-
A new
columns
layer for easier verification of responsive UI. It is a simple yet versatile layer that can divide provided bounds into equally wide columns and draw nested layers in each column. -
An experimental
ratio-keyline
layer has been ported to Rhythm from Material Cue. It also got a newtext
argument that allows to set arbitrary text to the label instead of it displaying the ratio.Note that this is an experimental layer, and changes are planned to
ratio-keyline
anddimensions-label
layers in the upcoming updates. -
The issue with incorrect rounding of step distance in
GridLines
has been fixed. Previously the step was first rounded and then added (e.g.3dp
became5px
on hdpi) resulting in an additive error, and now it’s other way around. -
Some of the default overlay settings, such as grid color and keyline thickness, have been changed.
-
Significant inner refactoring, so that Rhythm could be used within Material Cue.
-
The sample has been updated to make use of the changes and improvements, however as of Jun 28, it’s not published to the Play Store yet.