1.5 SDK problem with WebView.getZoomControls()

by N4Spd » Thu, 16 Apr 2009 13:47:56 GMT


Sponsored Links
 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
--~--~---------~--~----~------------~-------~--~----~



1.5 SDK problem with WebView.getZoomControls()

by jharby » Wed, 29 Apr 2009 01:07:30 GMT


 


I'm seeing that getZoomControls() is deprecated. Does anyone know the
alternative?

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


1.5 SDK problem with WebView.getZoomControls()

by nEx.Software » Wed, 29 Apr 2009 05:09:43 GMT


 Should be: WebView.getSettings().setBuiltInZoomControls(true);






--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Keep app from restarting when touching icon from Home screen

I want my application to resume what it is doing regardless of where I
press the icon (Home screen, app picker, or running apps).  Right now
if my app is in the background and I press the icon on the home
screen, the app restarts with my Main Activity.  Once here, if I press
the back button the app resumes from the activity it left off before
it was put in the background.  If it's running in the background and I
hold the home button and select my app from the current running apps,
it resumes correctly.

How do I avoid my app from going to my Main activity when it is
selected from the Home screen or app picker?  I have tried adding the
following in my Manifest XML file, but it doesn't help:

<activity android:name=".Main"
                          android:launchMode="singleTask"
                          android:alwaysRetainTaskState="true"
                  android:label="@string/app_name">


Any help would be greatly appreciated!
--~--~---------~--~----~------------~-------~--~----~

2. Keep app from restarting when touching icon from Home screen

I don't see anything obvious; you don't have anything special, so this
should work the same as the normal behavior.  Could you try running ApiDemos
and seeing if that has the behavior you want?  If not, what different
behavior do you want?










-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~

3. Emulator can't access host os's network

4. deploying same application twice different content

5. Synchronized Statements In Lunar Lander Sample

6. Could not find HelloWorld.apk

7. Hello world !