Skip to content

Add support for homescreen-style dot animation #4

Description

@ronaldsmartin

Build alternate dot animation like the one used in the default Android launcher:
The dot for the new page grows and changes color, while the dot for the previous page shrinks and fades to match other unselected dots.

This should probably be toggleable via a styleable enum attribute:

<com.itsronald.widget.ViewPagerIndicator
        ...
        app:dotAnimation="scale|ink"/>

where scale describes the animation above and ink is the current (and default) style.


There should also be a matching Java API:

@IntDef({ANIMATION_STYLE_INK, ANIMATION_STYLE_SCALE})
public @interface AnimationStyle {}

@AnimationStyle
getAnimationStyle();

setAnimationStyle(@AnimationStyle animationStyle);

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions