How to capture the end of a Zoom In/Out animation from a MapController

by rajesh.singh » Sat, 29 Jan 2011 03:07:32 GMT


Sponsored Links
 Hello,

Just an interesting query here, is there a way to capture when a zoom
animation sequence has ended when calling either:

MapController.zoomIn() or MapController.zoomOut();

I know that it does kick off an animation sequence to zoom in/out to
the next level, however there is no known way I can find/google
search, etc to find out when it finishes that sequence. I need to be
able to run an update command when that is stopped so my map updates
correctly.

I've found that by running the update command after calling the above
function the Projection isn't from the zoom out level but somewhere
inbetween (so I can't show all the data I need).

Any ideas?

Cheers,
Raj

-- 



Re: How to capture the end of a Zoom In/Out animation from a MapController

by TreKing » Sat, 29 Jan 2011 03:59:48 GMT


 



Not really, the Maps API is really lacking in this regard (well, in a lot of
regards, actually, but we'll focus on this one).

What's been suggested before is for you to track the zoom level yourself,
perhaps on each Draw() call, since you know this is triggered when the map
has been invalidated (which happens on a zoom). Check the zoom level there
and if it's different, trigger your update (or kick off your own
ZoomChangedListener).

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 


Sponsored Links


Other Threads

1. Can't enable bluetooth

Hi, all
I'm using Tattoo, whose official system is donut. I want to compile
android from AOSP and port it into my Tattoo and then the bluetooth
issue comes up. After the source was compiled and the image was
flashed, I could not enable bluetooth both through UI and command
line. The logcat complained 'E/bluedroid(  132): bt_enable: Timeout
waiting for HCI device to come up' through android UI while hciattach
outputed 'chip : unknown (5)' and 'segmentation fault' error when I
executed 'hciattach -n -s ...'(same as in init.bahamas.rc file) as
root through the adb shell.

I've searched a lot and found some thread said that a few Htc devices
used /system/bin/bts to active FM radio and Bluetooth hardware
interface through the two .bts(FMInit_*.bts and TIInit_*.bts)
firmwares. I'm not sure about that. I've copied the bts from stock ROM
to current AOSP, but no joy. And there is no brf6300.bin in /etc/
firmware directory, only TIInit_5.3.53.bts. So I linked the
TIInit_*.bts file to brf6300.bin, but still no luck. Bluetooth-related
items in init.bahamas.rc and init.rc are pasted here:

the init.bahamas.rc:
    # bluetooth power up/down interface
    chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
    chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
    chmod 0660 /sys/class/rfkill/rfkill0/state
    chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/
serial_lock_cpu
    chmod 0660 /sys/devices/platform/msm_serial_hs.0/serial_lock_cpu
service hciattach /system/bin/hciattach \
    -n -s 115200 /dev/ttyHS0 texas 4000000 flow
    user bluetooth
    group bluetooth net_bt_admin
    disabled
the init.rc:
service dbus /system/bin/dbus-daemon --system --nofork
    socket dbus stream 666 bluetooth bluetooth
    user bluetooth
    group bluetooth net_bt_admin

service hcid /system/bin/hcid -s -n -f /etc/bluez/hcid.conf
    socket bluetooth stream 660 bluetooth bluetooth
    socket dbus_bluetooth stream 660 bluetooth bluetooth
    # init.rc does not yet support applying capabilities, so run as
root and
    # let hcid drop uid to bluetooth with the right linux capabilities
    group bluetooth net_bt_admin misc
    disabled

service hfag /system/bin/sdptool add --channel=10 HFAG
    user bluetooth
    group bluetooth net_bt_admin
    disabled
    oneshot

service hsag /system/bin/sdptool add --channel=11 HSAG
    user bluetooth
    group bluetooth net_bt_admin
    disabled
    oneshot

#btips
service btips /system/bin/bts
    socket bluetooth stream 660 bluetooth bluetooth
    socket dbus_bluetooth stream 660 bluetooth bluetooth
    group bluetooth net_bt_admin misc
    disabled
    oneshot

These two files seem ok. Is there anything wrong? However, after I
booted my Tattoo(not enabled bt yet), /sys/class/rfkill/rfkill0/state
had been set to 1 and socket for dbus_bluetooth/bluetooth had not been
created. /dev/ttyHS0 was there with the proper permissions. Now my
system seems unable to recognise the the bluetooth and can't
communicate with it. But dbus-daemon is running. The command of
'hcitool dev' returns nothing and I'm sure the kernel is fine.

Any ideas? Thank you.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Recovery milestone

Paging para suhu milestone...

http://www.modmymoto.com/forums/showthread.php?t=531599

dah ada yang cobain?


-- 
-------------------------------
@acynx
acynx....@naekgenteng.com
ac...@ratjoendroid.com
---sent from pc

-- 
"Indonesian Android Community [id-android]" 

3. Can an AppWidget's RemoteViews be edited/created dynamically, or only from XML?

4. Comparing 2 Voice API?

5. Can an AppWidget's RemoteViews be edited/created dynamically, or only from XML?

6. how to load the android in debug mode using U-boot

7. API call from browser