Friday, February 14, 2014

How to deal with multiple sliding event of conflict?


posts by wyj23114 on 2013-11-20 09:04:29 Edit
android is an activity
Slide the left one slidingmenu launch menu on the right is a linearlayout, which has a slide up and down the scrollview, scrollview There is a Gallery slide show effect, there are pictures of events around the slide switch, the question now is
1 Open the activity when the slide up and down to normal, but the menu launched once, it can not slide up and down in response to the occasional times can slide
2.Gallery sliding events directly being blocked.

Solving the slide master how to solve these two events conflict<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Look at view time distribution process
Reply:
public boolean onTouchEvent (MotionEvent evt) {
}

@ Override
public boolean onInterceptTouchEvent (MotionEvent evt) {
}

Overloaded view the above two methods. Adopt a view of the event, to stimulate different treatment. You can consider using a listener
Reply:
onsaveInstance when the state of preservation, onRestoreInstance recovery time before you can use a normal touch, otherwise it may be ineffective
Reply:
Said the old problem temporarily solved it, new problems came.
After the recovery menu, slide up and down directly, scrollview sometimes did not respond, react only to wait a few seconds or when it gets focus. How can we solve?

No comments:

Post a Comment