Skip to content

add onCancel callback#116

Open
egirlasm wants to merge 1 commit intoParkSangGwon:masterfrom
egirlasm:master
Open

add onCancel callback#116
egirlasm wants to merge 1 commit intoParkSangGwon:masterfrom
egirlasm:master

Conversation

@egirlasm
Copy link

No description provided.

@egirlasm
Copy link
Author

egirlasm commented Jun 22, 2019

webview 에서 back 버튼 클릭시 WebChromeClient onShowFileChooser 에서 리턴이 안됌.
때문에 이미지 선택창 한번만 뜨고 다시 안뜸.

 // For Android 5.0+
  public boolean onShowFileChooser(WebView webView, ValueCallback < Uri[] > uploadFile, WebChromeClient.FileChooserParams fileChooserParams) {
      TedBottomPicker.with(MainActivity.this)
          .setPeekHeight(1600)
          .showTitle(false)
          .setCompleteButtonText("완료")
          .setEmptySelectionText("No Select")
          .setSelectedUriList(selectedUriList)
          .SetOnUserCancelled(new TedBottomSheetDialogFragment.onUserCancelListener() {
              @Override
              public void onCancel() {
                  uploadFile.onReceiveValue(null); // 이거 없으면 다시 안뜸
              }
          })
          .showMultiImage(uriList - > {
              selectedUriList = uriList;

              Uri[] results = selectedUriList.toArray(new Uri[0]);

              Log.d(TAG1, " length " + results.length);
              mFilePathCallback.onReceiveValue(results);
              selectedUriList.clear();


          });
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant