in my application i have to show the popup page in webview,i use
javainterface for showing the popup,but i got the popup window but the page
was not display i got the empty popup window in main page i call the
javainterface method to show pop,i have cretaed the popup like this
public void showpopup() {
LayoutInflater layoutInflater
= (LayoutInflater)getBaseContext()
.getSystemService(LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.activity_main, null);
final PopupWindow popupWindow = new PopupWindow(
popupView,
LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT);
popupWindow.setContentView(popupView);
infoWebView = (WebView)popupView.
findViewById(R.id.webviewActionView);
WebSettings settings = infoWebView.getSettings();
// settings.setSupportMultipleWindows(false);
settings.setJavaScriptEnabled(true);
infoWebView.setWebViewClient(new WebViewClient());
infoWebView.setWebChromeClient(new WebChromeClient());
// settings.setJavaScriptCanOpenWindowsAutomatically(false);
// settings.setBuiltInZoomControls(true);
// infoWebView.requestFocusFromTouch();
infoWebView.loadUrl("http://www.google.com");
// popupWindow.setOutsideTouchable(false);
infoWebView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String
url) {
view.loadUrl(url);
return true;
}
});
buttton=(Button)popupView.findViewById(R.id.popup_closer);
buttton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
popupWindow.dismiss();
}
});
popupWindow.showAtLocation(Browser, Gravity.BOTTOM, 10,10);
popupWindow.update(20, 70, 600, 500);
}
}
what's the wron with this code ,can any onme know how do this
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en