Skip to content

Commit

Permalink
1. 히트텍스트 에딧일떄만 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
cookiegon committed Feb 24, 2020
1 parent bc87f75 commit b79df50
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.4.1"
versionName "1.4.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
15 changes: 14 additions & 1 deletion app/src/main/java/ck/lib/module/webkit/ckwebview/CKWebView.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
import java.util.Map;
import java.util.MissingResourceException;

import static android.webkit.WebView.HitTestResult.EDIT_TEXT_TYPE;

/** Advanced WebView component for Android that works as intended out of the box */
@SuppressWarnings("deprecation")
public class CKWebView extends WebView {
Expand Down Expand Up @@ -1031,7 +1033,18 @@ public void onDownloadStart(final String url, final String userAgent, final Stri
setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
return !isLongClickDrag;

HitTestResult result = getHitTestResult();

Log.e("HITTESTRESULT", "result = " + result);

if(result.getType() == EDIT_TEXT_TYPE){
return false;
}else {
return true;
}

// return !isLongClickDrag;
}
});

Expand Down

0 comments on commit b79df50

Please sign in to comment.