Configure Animation Strategies and Character Orders
masterRollingText allows you to define how characters transition from one state to another.
Animation Strategies
- Default Behavior: Small characters roll down to become large characters, and vice versa.
- Directional Control: You can specify strategies to make rolling occur in a single direction.
- Carry/Increment Animation: Supports incrementing from low-value digits to high-value digits (not limited to decimal). Note: This is only for strings with length < 10 to prevent integer overflow and requires the character sequence to include '0'.
Character Orders
You must define the sequence of characters to tell the view how to transition between the original and target characters. You can add multiple orders; the first one that matches both the source and target characters takes priority.
Commonly used orders available in CharOrder constants:
CharOrder.AlphabetCharOrder.UpperAlphabetCharOrder.NumberCharOrder.HexCharOrder.Binary
To implement custom behavior, implement the CharOrderStrategy interface.
alphaBetView.addCharOrder(CharOrder.Alphabet);
alphaBetView.addCharOrder(CharOrder.UpperAlphabet);
alphaBetView.addCharOrder(CharOrder.Number);
alphaBetView.addCharOrder(CharOrder.Hex);
alphaBetView.addCharOrder(CharOrder.Binary);