Hiteshdua1
Hiteshdua1

Reputation: 2286

Custom viewpager imageslider?

I want to create something like this

Although This is a solution ViewPager with previous and next page boundaries but it has limited scroll to only visible current image and does not work when i try to scroll from extreme left or right.

I want side images from left and right to be a little smaller and centre image to be on focus and larger like the image shown and with the indicator and text.

Upvotes: 1

Views: 709

Answers (1)

Divers
Divers

Reputation: 9569

Not sure that got you right, but something similar I've done with:

pager.setClipToPadding(false);
pager.setPadding(50, 0, 50, 0);

UPD.

ViewPager indicator

In order to scale not visible fragments, try to use setOnPageChangeListener, and scale position - 1 and position + 1 fragment's view. Here how to take reference on fragment from ViewPager.

Upvotes: 2

Related Questions