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

Is there an option to expand/collapse the draglayout by calling a method manually? #7

Closed
anitaa1990 opened this issue Apr 27, 2017 · 4 comments

Comments

@anitaa1990
Copy link

Hi,

I would like to be able to expand the draglayout without any click function. Please let me know if this is possible at the moment and if so, how would I go about doing that?

Thanks for the awesome library!! You rock!

@xmuSistone
Copy link
Owner

Yeah, it is easy to expand the draglayout. Wrap the onClick function into a new public method, hope that helps.

@anitaa1990
Copy link
Author

Hi, I checked it out and had a doubt. How do we collapse the draglayout? In the clickListener there is an option to expand the draglayout and then open the detail screen. No option to collapse the layout.

Could you please guide on how to do this?

@xmuSistone
Copy link
Owner

xmuSistone commented Apr 27, 2017

add a new method as follows:

public void collapse() {
      if (mDragHelper.smoothSlideViewTo(topView, originX, originY)) {
                ViewCompat.postInvalidateOnAnimation(DragLayout.this);
      }
}

@iman2420
Copy link

dragLayout.performClick(); not work!
how to expand manually?

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