Hi all (in particular 3.0 devs),

I just noticed an inconvenience under HoneyComb, and thought I'd share it with you for thoughts.

I may have been pushing the limits but in the past I've successfully got the following to work as expected on all platforms from 1.5 and up:

// Trimmed code for readability
final ImageView throbber = new ImageView(context); // Spinning arrows;
final FrameLayout fl = new FrameLayout(context);
final WebView i = new WebView(context);
final Dialog d = new Dialog(context);
d.requestWindowFeature(Window.FEATURE_NO_TITLE);
fl.addView(throbber);
fl.addView(i);
i.setViewClient(/* bringChildToFrontOnPageFinished */);
i.loadUrl(someUrlToAFairlyBigPage);
d.setContentView(fl);

And then I return this dialog from onCreateDialog();

Overall, it technically still works, but the difference is that previously when the WebView is broughtToFront, the dialog would size up as needed (typically to fill the screen), but now it still stays the same height as the throbber. Scrolling is then hard to say the least.

Now, there are some semi-obvious workarounds to make this work reasonably (like having a bigger throbber or forcefully use setLayoutParams() on throbber/webview), but my question is whether this change was an intentional limitation of the redesign (seems somewhat unlikely), or an easily fixed bug? Or perhaps I was really just exceedingly lucky to get this to work before - but it seemed like a neat effect and it works as expected if I use AlertDialog.Builder() instead, but I really don't want the title to waste screen space.

Advice very welcome. I can create a minimal example app if you like.

                Best / Jonas

PS. While the WebView in the dialog is open, the emulator seems to run at full throttle for some obscure reason - however, this happens in 1.x/2.x too so that seems unlikely to be related to the issue.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to