I open a dialog when the image of a WebView
is pressed and then I get this warning. I assume that the WebView
is the different thread he is talking about but is there a way to fix this? I simply execute a function when the image is pressed. The function is inside a fragment.
public View onCreateView(....
...
...
mWebView.addJavascriptInterface(new Object()
{
@JavascriptInterface
public void performClick()
{
enlargeImage();
}
}, "ok");
private void enlargeImage()
{
mImageView = new ImageView(getActivity());
loadImageFromURL(mImage, mImageView);
loadPhoto(mImageView);
}
here is the loadPhoto function which is giving me the problem.
To be more precise the Dialog is giving the problem. If there is anything I can replace it with it will do as well like a window. What I have and what I want is a window to display a image in which I can close.