Zoom from a point

by araj2...@gmail.com » Fri, 09 Jan 2009 00:01:12 GMT

Sponsored Links
     Can someone tell me how zoom in the Browser application is done
from the center of a page and not from (0, 0)?
Webkit by default does zoom from the origin.
Just curious to know how zoom from center is done in Android's

Amruth Raj.


Other Threads

1. Missing a Proximity Listener

Looking at Android code, I've seen that SENSOR_PROXIMITY is managed as
a sensor, but there is no current Android Framework managing events
coming a proximity sensor.
We can see for example that SENSOR_ACCELEROMETER is managed by class
OrientationListener which will provide to Android applications
information about any orientation change :
public void onOrientationChanged(int orientation);

I suggest to do the same for the Proximity. Each time a proximity
detection does occur, or if the object has moved a way, then this new
class will provide to any Android application this proximity update :
public void onProximityChanged(int proximity_distance);
Name of this new class will be ProximityListener

Does everyone agree to say this enhancement would be great since
nothing yet is done in this way ?

Note that I also raised this question there :


2. range of G1 orientation sensor's values (pitch and roll)


I checked the API documentation for SensorListener ---
All values are angles in degrees.
values[0]: Azimuth, rotation around the Z axis (0<=azimuth<360). 0 =
North, 90 = East, 180 = South, 270 = West
values[1]: Pitch, rotation around X axis (-180<=pitch<=180), with
positive values when the z-axis moves toward the y-axis.
values[2]: Roll, rotation around Y axis (-90<=roll<=90), with positive
values when the z-axis moves toward the x-axis.

On G1, it works fine in portrait mode but I have a problem in landscape mode.
I expected value[1] to have a range of -180 to 180 and value[2] to have a
range of -90 to 90 in both (landscape and portrait) modes.
But I actually read value[1] to have a range of -90 to 90 and value[2] to
have a range of -180 to 180 in landscape mode.

Is it peculiar to G1 or is there some wrong in API documentation?

Any help is appreciated.

egg <t.eg...@gmail.com>


3. How to use check box in list view?

4. Are paid apps coming tomorrow?

5. How to load image (background) on layout

6. Learn Android Online

7. failed to install applications on G1 through USB