I am on Android 2.2 and I am creating a dialog with a WebView inside it:
@Override protected Dialog onCreateDialog(int id) { Dialog dialog = new Dialog(this);
It works, but the first time I open the dialog, the WebView not exposed, even if the content is loaded.
I know this because with HierarchyViewer I can see the contents and force the layout request, which I also see in the emulator. Also, if I just canceled the dialog and reopened it, everything will work.
Who is wrong, Android or me? I tried putting the load in onPrepareDialog() , but this is the same.
EDIT
I changed the parameters of the WebView layout from fill_parent to wrap_content and that way it works. I see that it opens with a growth of 0, and then after loading it grows. Width worked even earlier.
bigstones
source share