Invalid click on GalleryPanel children

This commit is contained in:
seven332 committed 2015-08-12 15:04:10 +08:00
1 parent e9c1eac800
commit 4ca95f0b7c
1 file changed
+5 -1
@@ -175,7 +175,11 @@ public class GalleryPanel extends GLView implements FitPaddingImpl, Slider.OnSet
@Override
protected boolean onTouch(MotionEvent event) {
if (mShown && event.getAction() == MotionEvent.ACTION_UP) {
setShown(false, true);
int x = (int) event.getX();
int y = (int) event.getY();
if (!mRightView.bounds().contains(x, y) && !mBottomView.bounds().contains(x, y)) {
setShown(false, true);
}
}
return mShown;
}