Maps - position of zoom controls

by Neilz » Mon, 25 Apr 2011 17:29:38 GMT


Sponsored Links
 When I tap my map, the zoom controls appear in the center of the
screen at the bottom.

Is it possible to control where they sit? I notice on the google maps
app, they are aligned into the bottom right corner of the map, which
is what I'd like to do in my own map activity.

Thanks.

-- 



Re: Maps - position of zoom controls

by Filip Havlicek » Mon, 25 Apr 2011 18:18:55 GMT


 Here you go

 http://tinyurl.com/3fha8xl 

2011/4/25 Neilz <neilhorn...@gmail.com>


-- 


Sponsored Links


Re: Maps - position of zoom controls

by Neilz » Mon, 25 Apr 2011 19:32:20 GMT


 Oh my sides are splitting.


Ok, I've done some searching, and found a half solution... but it's
not without issues:

I've set my own ZoomControls object, in the layout xml, and added
listeners to activate the zooms (as per this link...
 http://stackoverflow.com/questions/920741/always-show-zoom-controls-on-a-mapview )

But the only issue is that the zoom buttons don't disable themselves
when fully in/out. It says you can use the following line to rectify
this:

mapView.getZoomButtonsController().setAutoDismissed(false);

...but because I'm not using the built-in-zoom-controls, this doesn't
work. There doesn't seem to be a way of accessing and controlling the
buttons from my own ZoomControls object...




-- 



Re: Re: Maps - position of zoom controls

by Filip Havlicek » Mon, 25 Apr 2011 19:37:45 GMT


 Why didn't you try the Reto Meier solution? Third link from the Google
search.

 http://stackoverflow.com/questions/263507/placing-zoom-controls-in-a-mapview 

And if you want help, post your XMLs and code samples.

2011/4/25 Neilz <neilhorn...@gmail.com>



-- 



Re: Maps - position of zoom controls

by Neilz » Mon, 25 Apr 2011 20:07:22 GMT


 Yes, this solution does work, thanks.

Actually it was the first solution I looked at - problem was it uses a
deprecated method, and there doesn't seem to be a way of doing it
without using the method - so for some reason I decided against trying
it out. But hey if it works, that's good enough.





-- 



Re: Re: Maps - position of zoom controls

by Filip Havlicek » Mon, 25 Apr 2011 20:48:44 GMT


 Oh I see. Took a brief look at the deprecated method and didn't find any
easy way to do that, so I suggest you test it on the various OS versions in
the emulator and on some of the devices you have access to and if it works
on all of them, then it's probably fine. I haven't done anything with
MapView for a while now, so can't really give any real-life experience.

Best regards,
Filip Havlicek

2011/4/25 Neilz <neilhorn...@gmail.com>




-- 



Other Threads

1. CNN app for android

Cobain pake market enabler dulu?

Thanks,
Ferry L

-- 
"

2. Facing a problem with Google SIPDemo application

Hello,
I have to build a SIP application for my studies, i maked an Asterisk
server, testing it with xlite and all is working.
However, i wanted to test the server through my Android phone(has 2.3
Gingerbread), i installed the SIPDemo app on it, adding the useful
informations(Login, domain and password as configured in the server)
and nothing happens, it doesn't indicate if you are connected on the
server or not.
I run the application in the Android emulator(ADT 2.3) and it saids
"Registration failed". Can you please help me? I really have to make
this project(firstly make working the SipDemo app, then making my own)
to have my diploma.

Thank you very much.

-- 

3. Borders between fragments?

4. Unit testing framework with monkeyrunner

5. Android apps installed on external memory.

6. Use Google Spreadsheets API in Android

7. Incoming Call dari Telkomsel Nomernya Aneh