mAndroid
mAndroid

Reputation: 5177

Extending viewpager to include navigation indicators

I'm trying to add some arrows to the screen to indicate if there are items available to the left or right so that the user knows to scroll.

Initially I just added these images into the instantiateItem function in the pageradapter. However I want to animate the arrows so that they fade in and out and disappear when the user touches the screen.

I've started to think that I may be best off extending the viewpager class so that it always displays the arrows independently of the adapter. I've looked through the code but can't see a place where I would add the overlay view.

Has anyone got any ideas?

Thanks, m

Upvotes: 1

Views: 1602

Answers (1)

mAndroid
mAndroid

Reputation: 5177

As suggested by CommonsWare

You might wish to take a look at github.com/JakeWharton/Android-ViewPagerIndicator and see how Jake did it.

this information lead me to the solution.

Upvotes: 1

Related Questions