This commit is contained in:
daimajia 2014-08-30 12:11:54 +08:00
parent c0d5737356
commit 1ed01986ed
1 changed files with 7 additions and 0 deletions

View File

@ -682,6 +682,11 @@ public class SwipeLayout extends FrameLayout {
* @return
*/
private View childNeed(ViewGroup v, MotionEvent event){
if(v == null) return null;
if(v.onTouchEvent(event))
return v;
int childCount = v.getChildCount();
for(int i = childCount - 1; i >= 0; i--){
View child = v.getChildAt(i);
@ -704,6 +709,8 @@ public class SwipeLayout extends FrameLayout {
* @return
*/
private boolean childNeed(View v, MotionEvent event){
if(v == null) return false;
if(event.getX() > v.getLeft() && event.getX() < v.getRight()
&& event.getY() > v.getTop() && event.getY() < v.getBottom()){
return v.onTouchEvent(event);