Java Code Examples for android.webkit.WebView#setPictureListener()

The following examples show how to use android.webkit.WebView#setPictureListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Web3WebviewManager.java    From react-native-web3-webview with MIT License 5 votes vote down vote up
@ReactProp(name = "onContentSizeChange")
public void setOnContentSizeChange(WebView view, boolean sendContentSizeChangeEvents) {
    if (sendContentSizeChangeEvents) {
        view.setPictureListener(getPictureListener());
    } else {
        view.setPictureListener(null);
    }
}
 
Example 2
Source File: ReactWebViewManager.java    From react-native-GPay with MIT License 5 votes vote down vote up
@ReactProp(name = "onContentSizeChange")
public void setOnContentSizeChange(WebView view, boolean sendContentSizeChangeEvents) {
  if (sendContentSizeChangeEvents) {
    view.setPictureListener(getPictureListener());
  } else {
    view.setPictureListener(null);
  }
}
 
Example 3
Source File: TwitterShare.java    From IdealMedia with Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    super.onCreate(savedInstanceState);

    setContentView(R.layout.dialog_twitter_share);

    close = findViewById(R.id.close_button);

    WebView mWebView = (WebView) findViewById(R.id.webWiew);
    mWebView.getSettings().setJavaScriptEnabled(true);

    mWebView.loadUrl(shareURL);
    mWebView.setWebViewClient(new ThisWebViewClient());

    mWebView.setPictureListener(new WebView.PictureListener() {
        @Override
        public void onNewPicture(WebView view, Picture picture) {
            if (progress != null && progress.isShowing()) {
                progress.dismiss();
            }
        }
    });

    close.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View arg0) {
            TwitterShare.this.cancel();
        }
    });
}