Okay, if the new WebView is still some Layout / ViewGroup you could hack 
the same functionality into it again by peeking at the WebView.java 
source<https://github.com/android/platform_frameworks_base/blob/master/core/java/android/webkit/WebView.java>
:

    public void setEmbeddedTitleBar(View v) {
        if (mTitleBar == v) return;
        if (mTitleBar != null) {
            removeView(mTitleBar);
        }
        if (null != v) {
            addView(v, new AbsoluteLayout.LayoutParams(
                    ViewGroup.LayoutParams.MATCH_PARENT,
                    ViewGroup.LayoutParams.WRAP_CONTENT, 0, 0));
        }
        mTitleBar = v;
    }


You could derive your own "CompatWebView" that overrides this method and 
checks the API level via 
Build.VERSION.SDK_INT<http://developer.android.com/reference/android/os/Build.VERSION.html#SDK_INT>and
 branch accordingly to your workaround.

If that is neither wanted nor recommended by Google or just too shaky for 
your taste, another workaround comes to my mind that might not work as 
smoothly, but it's better than nothing:

You could create an HTML page (as a string for example) with your header 
title on top and an iframe below which loads the actual URL. Only problem 
with that iframe is that you need to resize it according to the loaded 
content. I don't know how this interacts with the way WebView tries to fit 
in content or how pinch-to-zoom works with that. Another problem is that 
the title bar would also change its size when the user zooms in or out.


-- 
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