Android Question Custom buttons on google maps

Dario126

Member
Licensed User
Longtime User
On main activity I have google maps which have some default buttons (recenter, zoom, etc). When I put my standard button view it looks different. On photo is 'a' is 'statelistdrawable' and on b is 'defaultdrawable'.

How to achieve same look (white with border)?

How to position next to them (how to get position of original google maps buttons)?

Can default buttons be re positioned on another corner?
 

Attachments

  • a.png
    18.6 KB · Views: 274
Last edited:

warwound

Expert
Licensed User
Longtime User
Upvote 0

ValDog

Active Member
Licensed User
Longtime User


Is there a way to overlay say a label on a Google Map? I'd like to be able to use it to update the user of ongoing events while he is looking at maps.
 
Upvote 0

ValDog

Active Member
Licensed User
Longtime User
Have you tried to add the view over the map (just add it to the activity after you add the map)?

Had not thought of that - haven't added views other than with the designer to this point. I'll give it a try. Thanks Erel!
 
Upvote 0

ValDog

Active Member
Licensed User
Longtime User
Have you tried to add the view over the map (just add it to the activity after you add the map)?

Well, I've tried to add a label to the Activity and to the MapPanel - no success with either - anyone have any ideas? The following is what I add in Activity_Create for the activity"\:

Dim lblDRate As Label
lblDRate.Initialize("")
lblDRate.TextSize = 10
lblDRate.TextColor = Colors.White
Activity.AddView(lblDRate,20dip, 10dip, 200dip, 40dip)
' MapPanel.AddView(lblDRate,20dip, 10dip, 200dip, 40dip)
 
Upvote 0

ValDog

Active Member
Licensed User
Longtime User
Have you set the label text? Otherwise it will be transparent.

Yes, here's what I added in Activity_Create for the map module:

Dim lblDRate As Label
lblDRate.Initialize("")
lblDRate.TextSize = 10
lblDRate.TextColor = Colors.White
lblDRate.Text = "Test"
Activity.AddView(lblDRate,20dip, 10dip, 200dip, 40dip)
' MapPanel.AddView(lblDRate,20dip, 10dip, 200dip, 40dip)

I've tried adding to the Activity and to the MapPanel - w/o any success.


Update: once I added "lblDRate.Color = Colors.Yellow" to give it a background color, I saw it perfectly. Thanks for the help!
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…