Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ public void onEnd(MultiTouchGestureDetector detector) {

@Override
public boolean dispatchTouchEvent(MotionEvent ev) {

//空白区域,没有选中元素,放行
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
final float x = ev.getX(), y = ev.getY();
WsElement clickedElement = findElementByPosition(x, y);
if (clickedElement == null && mSelectedElement == null) {
return false;
}
}

if (mSelectedElement != null && mSelectedElement.isShowingViewResponseSelectedClick()) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
mUpDownMotionEvent[0] = copyMotionEvent(ev);
Expand Down Expand Up @@ -178,6 +188,12 @@ public boolean onTouchEvent(@NonNull MotionEvent event) {
case MotionEvent.ACTION_DOWN:
cancelAutoUnSelectDecoration();
singleFingerDown(event);
//单指操作不在子控件,进行事件分发,不作全局拦截
if (mMode == BaseActionMode.SINGLE_TAP_BLANK_SCREEN) {
autoUnSelectDecoration();
singleFingerUp(event);
return false;
}
break;
case MotionEvent.ACTION_MOVE:
mDetector.onTouchEvent(event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void add(ElementContainerView elementContainerView) {

if (mElementShowingView == null) {
mElementShowingView = initView();
AbsoluteLayout.LayoutParams showingViewLayoutParams = new AbsoluteLayout.LayoutParams((int) mOriginWidth, (int) mOriginWidth, 0, 0);
AbsoluteLayout.LayoutParams showingViewLayoutParams = new AbsoluteLayout.LayoutParams((int) mOriginWidth, (int) mOriginHeight, 0, 0);
mElementShowingView.setLayoutParams(showingViewLayoutParams);
mElementContainerView.addView(mElementShowingView);
} else {
Expand Down