xmuSistone / CardSlidePanel

enable users to slide card to the left or right smoothly and continuously
2.39k stars 516 forks source link

Set gravity center #81

Closed Omid-naji closed 6 years ago

Omid-naji commented 6 years ago

How can i set center gravity for card device-2017-11-26-202508

xmuSistone commented 6 years ago

in CardSlidePanel.java, modify the onLayout method: image

Omid-naji commented 6 years ago

I want all the cards in the middle of the page screen to express. Not that I change the position of the cards to each other.

For example, I only have one card. How do you set center gravity for this card?

xmuSistone commented 6 years ago

I see. U want to make the cards' gravity be center. In CardSlidePanel.java, try the code: image

Omid-naji commented 6 years ago

Worked Thank you for your help