赞
踩
Hello Member stackover。 我编程应用程序andoid>我需要显示(查看)网页内弹出窗口 我需要查看此页面在beatuy设计 我用这个声明,但页面不显示和popupwindow显示非常小。Android studio Webview弹出窗口
Mainactivity:
button58.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
FragmentTransaction manger= getSupportFragmentManager().beginTransaction();
pop_web_view pop3 =new pop_web_view();
pop3.show(manger,null);
}
});
弹出窗口类:
public class pop_web_view extends DialogFragment implements View.OnClickListener{
View view;
@Override
public View onCreateView(LayoutInflater inflater, final ViewGroup container,
Bundle savedInstanceState) {
view = inflater.inflate(R.layout.web_view, container, false);
WebView webView = (WebView) view.findViewById(R.id.webview);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("https://www.google.com");
return view;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。