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. Get preferences from xml/preferences.xml

Hi,

How do I get the preferences from the preferences.xml file? I have
tried with this code:
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences
(this);

but it does not work. I think the error is coursed by the use of the
Context "this", because the preferences are set by an other class. How
can I access this preferences?

Thank you,
//Kaloer
--~--~---------~--~----~------------~-------~--~----~

2. Developing Android Apps

Hello,

I download the 1.5r1 SDK and Eclipse with ADT. So I tried the
following tutorial:

http://developer.android.com/guide/tutorials/hello-world.html

Seems to be simple...

But when I startet the Application I get these log output.

[2009-05-11 13:20:21 - HelloAndroid] ------------------------------
[2009-05-11 13:20:21 - HelloAndroid] Android Launch!
[2009-05-11 13:20:21 - HelloAndroid] adb is running normally.
[2009-05-11 13:20:21 - HelloAndroid] Performing
com.exmaple.helloandroid.HelloAndroid activity launch
[2009-05-11 13:20:21 - HelloAndroid] Automatic Target Mode: launching
new emulator with compatible AVD 'test'
[2009-05-11 13:20:21 - HelloAndroid] Launching a new emulator with
Virtual Device 'test'
[2009-05-11 13:20:22 - HelloAndroid] New emulator found: emulator-5554
[2009-05-11 13:20:22 - HelloAndroid] Waiting for HOME
('android.process.acore') to be launched...
[2009-05-11 13:21:24 - HelloAndroid] HOME is up on device
'emulator-5554'
[2009-05-11 13:21:24 - HelloAndroid] Uploading HelloAndroid.apk onto
device 'emulator-5554'
[2009-05-11 13:21:24 - HelloAndroid] Installing HelloAndroid.apk...
[2009-05-11 13:21:34 - HelloAndroid] Success!
[2009-05-11 13:21:34 - HelloAndroid] Starting activity
com.exmaple.helloandroid.HelloAndroid on device
[2009-05-11 13:21:37 - HelloAndroid] ActivityManager: Starting: Intent
{ comp={com.exmaple.helloandroid/
com.exmaple.helloandroid.HelloAndroid} }

So if I read the output correct, I should wait 1 minute and seconds to
test my application. Should that be a joke by google? Which developer
could work so??? This is a reason for me NOT to develop for the
android system.

Does anybody other information or takes it by everybody so long?

Thanks for help

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

3. Debugger not working for AppWidgets?

4. What, if any, Intent fired for long press on home key?

5. using android:imeOptions in Android 1.1

6. Define a [style] theme programatically and make it default

7. Failed to install Repo