The preferred API is
WebView.getWebSettings().setBuiltInZoomControls(true).  The new API is
simpler in that just setting the flag will automatically add/hide the
zoom controls.  It will also have better performance on the G1 and
some other devices due to it being hardware composited on top of the
WebView instead of software compositing.

Unfortunately, I'm not sure why you're seeing layout issues with the
old zoom controls.  Could you try changing the LinearLayout's
layout_width to fill_parent?  If this does not work, could you please
post a screenshot?

jason

On Tue, Apr 28, 2009 at 3:33 PM, Mariano Kamp <[email protected]> wrote:
> Yeah, I have the same problem.
> Anyone?
> Is the suddenly breaking and now deprecated getZoomControls() considered
> private API?
>
> On Tue, Apr 28, 2009 at 6:04 PM, jharby <[email protected]> wrote:
>>
>> On Apr 15, 10:47 pm, N4Spd <[email protected]> wrote:
>> > I have webview whose zoom controls are placed into a linearlayout at
>> > the bottom of the screen.
>> >
>> > It's been working fine on 1.1 but testing on the new 1.5 beta SDK
>> > shows that the zoom controls are scrunched.
>> > They still work, just the layout is bad (buttons overlapping).
>> >
>> > I have code similar to what's been posted here:
>> >
>> > ViewGroup zoom=(ViewGroup)findViewById(R.id.zoom);
>> > zoom.addView(_webView.getZoomControls());
>> >
>> > The layout is also similar to what's been posted here:
>> >
>> > <RelativeLayout ...>
>> >    <WebView.../>
>> >         <LinearLayout android:id="@+id/zoom"
>> >                 android:layout_width="wrap_content"
>> >                 android:layout_height="wrap_content"
>> >                 android:layout_alignParentBottom="true"
>> >                 android:layout_alignParentLeft="true" />
>> > </RelativeLayout>
>> >
>> > thanks,
>> > rob
>>
>> I'm seeing that getZoomControls() is deprecated. Does anyone know the
>> alternative?
>>
>>
>
>
> >
>

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

Reply via email to