Material-ViewPagerIndicator icon indicating copy to clipboard operation
Material-ViewPagerIndicator copied to clipboard

Add support for homescreen-style dot animation

Open ronaldsmartin opened this issue 8 years ago • 6 comments

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);

ronaldsmartin avatar Oct 14 '16 19:10 ronaldsmartin

Might as well add a none option too to turn off animation altogether.

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

ronaldsmartin avatar Oct 16 '16 22:10 ronaldsmartin

This feature is in development on the feature/distinct-animation-types branch.

The ink and none settings work as expected, while scale has not yet been implemented.

ronaldsmartin avatar Oct 30 '16 21:10 ronaldsmartin

For anyone following this issue, the implementation on the other branch is actually pretty complete if you want to try it out. I just haven't had time to test it on anything earlier than my API 24 Nexus 5X and don't want to create a new release until that's done.

ronaldsmartin avatar Dec 13 '16 19:12 ronaldsmartin

If anyone is still following this issue, I'm aiming to test and release this by the end of this weekend.

ronaldsmartin avatar Mar 01 '17 01:03 ronaldsmartin

Hello Ronald,

I'm very interested on this feature about turn off the dot animation. unfortunately in your last version 1.0.4 it's not present.

You think release it very soon? thanks in advance.

ghost avatar Aug 21 '17 09:08 ghost

Hey, What is your latest version number and where can i find it.

Digi18 avatar Apr 17 '18 11:04 Digi18