Closed CannyDuck closed 9 years ago
I try to create a custom WebView instead of a simple message as Dialog content:
@Override public BaseDialogFragment.Builder build(BaseDialogFragment.Builder builder) { WebView wv = new WebView(getActivity()); wv.loadData("<html><body><h1>Hello World!</h1></body></html>", "text/html", "UTF-8"); builder.setTitle(getActivity().getResources().getString(full ? R.string.changelog_full_title : R.string.changelog_title)) .setView(wv) .setPositiveButton(getActivity().getResources().getString(R.string.changelog_ok_button), new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); return builder; }
Unfortunately the WebView ist not displayed? What I am doing wrong? Try the code from your demo using an image as custom view works as expected.
You don't set any layout parameters to the WebView. I suggest creating a xml layout for the WebView.
I try to create a custom WebView instead of a simple message as Dialog content:
Unfortunately the WebView ist not displayed? What I am doing wrong? Try the code from your demo using an image as custom view works as expected.