Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make Stack transformation in opposite direction??? #13

Open
Karthikg206 opened this issue May 25, 2017 · 2 comments
Open

How to make Stack transformation in opposite direction??? #13

Karthikg206 opened this issue May 25, 2017 · 2 comments

Comments

@Karthikg206
Copy link

i want to implement swipe right will collapse stack how to achieve that....could you help me

@Rishabh-sx
Copy link

Hi, Override this
public void transformPage(View view, float position) {
if (position < -1) {
view.setAlpha(0);
} else if (position <= 0) {
view.setAlpha(1 + position);
view.setTranslationX(view.getWidth() * -position);
view.setTranslationZ(-1);
view.setScaleX(1);
view.setScaleY(1);
} else if (position <= 1) {
view.setAlpha(1);
view.setScaleX(1);
view.setScaleY(1);
view.setTranslationZ(1);
} else {
view.setAlpha(1);
}
}

@Alqasrawi
Copy link

Is there any solution to achieve the stack transformation in the opposite direction ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants