Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

try at the edge mode #23

Closed
jjhesk opened this issue Jul 28, 2015 · 7 comments
Closed

try at the edge mode #23

jjhesk opened this issue Jul 28, 2015 · 7 comments
Assignees

Comments

@jjhesk
Copy link

jjhesk commented Jul 28, 2015

The edge detection is not working. I just realized that your component on using dragviewhelper doesnt work in detection of edge detection to trigger the movement of the panel does not work. I discovered that the down detection was ACTION_MOVE instead of ACTION_DOWN. As the result it just triggered the move before considering the edge touch distance. I think we should build a brand new drag detection instead of using the one from android sdk.

@r0adkll
Copy link
Owner

r0adkll commented Jul 28, 2015

The ViewDragHelper component does it's 'detection' in the ACTION_DOWN and ACTION_POINTER_DOWN motion events as can be seen the source file (ViewDragHelper - Look at the shouldInterceptTouchEvent(...) and processTouchEvent(...) methods). The ViewDragHelper component also has built in support for Edge detection/dragging I just haven't implemented it yet.

Thus the ViewDragHelper component is more than sufficient for this library and I see absolutely no need to implement a custom solution for drag detection/handling.

@r0adkll r0adkll closed this as completed Jul 28, 2015
@jjhesk
Copy link
Author

jjhesk commented Jul 29, 2015

@r0adkll thanks for the kind support of the detection hint.
may i ask a question on how does it implement the true edge detection on the panel? I looked at the code i could see a way to call upon the method to the ViewDragHelper to make the edge detection work.. many thanks.

@r0adkll
Copy link
Owner

r0adkll commented Jul 29, 2015

Yes, you can set the edge when building the ViewDragHelper instance but there are 3 methods that need to be overriden and implemented in the Callback instances to support it. I do plan on implementing these changes here in the near future when I get the chance.

No problem!

@jjhesk
Copy link
Author

jjhesk commented Aug 5, 2015

i found another repo that has similar function here

@r0adkll
Copy link
Owner

r0adkll commented Aug 5, 2015

Interesting, can't say I'm a fan of his approach of making you extend his Activity which is why I built my library to be attachable.

I am currently testing and implementing an edge catch/drag mode right now that is out in the SNAPSHOT build.

@r0adkll r0adkll reopened this Aug 5, 2015
@r0adkll r0adkll self-assigned this Aug 13, 2015
@jjhesk
Copy link
Author

jjhesk commented Aug 19, 2015

I found it so hard to implement the slidr in the activity and please dont do the extend from the activity or appcompat because there are alot of other people need to add from behind. I really look forward to see the slidr that works on the real edge detection. Let me know when it is not. @r0adkll

@r0adkll
Copy link
Owner

r0adkll commented Sep 14, 2015

Edge dragging is now implemented and in release 2.0.4, it should become available on Maven Central with an hour or two.

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

No branches or pull requests

2 participants