Skip to content

Conversation

@linfaxin
Copy link
Collaborator

1.The surface and bottom view could be clickable and longClickable, and it's selector drawables works fine;
2.The swipeLayout can wrap in other gestural layout, the swipe and other layout's gesture work's pretty;

1.The surface and bottom view could be clickable and longClickable, and it's selector drawables works fine;
2.The swipeLayout can wrap in other gestural layout, the swipe and other layout's gesture work's pretty;
@linfaxin
Copy link
Collaborator Author

@daimajia
另外,我想 把 surfaceView 和 bottomView 必须为 ViewGroup 的限制去掉。
同时 所有 bottomView 支持在布局里用 layout_gravity 来标识自己的滑出方向(像DrawerLayout)
你怎么看 :)

Translation:

I think we can remove the constriction of the surfaceView and the bottomView which must be a subclass of the ViewGroup, and we can use layout_gravity to indicate the swiping direction (just like DrawerLayout).
What's your opinion on that? :)

@daimajia
Copy link
Owner

@linfaxin I'll check this PR later, thanks for your work on this project! ^.^

and i'm going to consider your idea seriously ( removing the constriction on the surfaceView and bottomView, and using layout_gravity to indicate the swipe direction) before replying you.

The bottom view can use layout_gravity to indicate the swiping direction
…l auto close when click on it's surface view
@linfaxin
Copy link
Collaborator Author

Improve the release drag logic, easy to open and close.

@linfaxin linfaxin changed the title improve touch handle and intercept logic Refactor the touch logic and usage. Mar 22, 2015
@JMPergar
Copy link

@linfaxin would be interesting that willOpenPercent will be customizable.

@linfaxin
Copy link
Collaborator Author

I see no SDK widget custom this. Maybe it's impossible?

@JMPergar
Copy link

On SwipeLayout.java

Line 1221:

float willOpenPercent = (isCloseBeforeDragged ? mOpentPercentToAutomaticSwipe : 1 -
            mOpentPercentToAutomaticSwipe);

And:

public float getOpentPercentToAutomaticSwipe() {
    return mOpentPercentToAutomaticSwipe;
}

public void setOpentPercentToAutomaticSwipe(float opentPercentToAutomaticSwipe) {
    mOpentPercentToAutomaticSwipe = opentPercentToAutomaticSwipe;
}

private float mOpentPercentToAutomaticSwipe = 0.25f;

@linfaxin
Copy link
Collaborator Author

Sorry, for my bad English. I mean it maybe not necessary.
The SDK widget, like ViewPager, DrawerLayout, not custom it.
So, is it necessary for developer?

@daimajia
Copy link
Owner

daimajia commented Apr 7, 2015

Hi, Mr @linfaxin .

Thanks your work on this project. Really sorry for my late reply cause recently was busy on some other heavy stuff.

I'll renew this project, and try to update every day. :-D

@daimajia
Copy link
Owner

daimajia commented Apr 8, 2015

@linfaxin
I spent an hour to check your PR, it's awesome! You made the code much cleaner.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless try catch

@linfaxin
Copy link
Collaborator Author

linfaxin commented Apr 8, 2015

Wait your merge :)

daimajia added a commit that referenced this pull request Apr 8, 2015
Refactor the touch logic and usage.
@daimajia daimajia merged commit f9ac392 into daimajia:master Apr 8, 2015
@daimajia
Copy link
Owner

daimajia commented Apr 8, 2015

@linfaxin May I add your wechat if you don't mind.

@linfaxin
Copy link
Collaborator Author

linfaxin commented Apr 8, 2015

@daimajia I sent you a email :) please check

@plrdev
Copy link

plrdev commented May 5, 2015

+1 for this. I believe this might resolve the issues we have with the library right now. Hope this is merged and a new release build asap. Thanks @linfaxin and @daimajia

@daimajia
Copy link
Owner

daimajia commented May 5, 2015

@eduplus Please check the latest release v1.2.0 . I have pushed it to maven.

@plrdev
Copy link

plrdev commented May 5, 2015

@daimajia That fixed our issue. Great, thanks a ton.

@daimajia
Copy link
Owner

daimajia commented May 5, 2015

@eduplus Especially thanks @linfaxin for his pull request. Enjoy it.

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

Successfully merging this pull request may close these issues.

4 participants