Android Google Maps v2: How to add marker with multiline snippet? -


does know how add multiline snippet google maps marker? that's code adding markers:

map.getmap().addmarker(new markeroptions()     .position(latlng()).snippet(snippettext)     .title(header).icon(icon)); 

i want snippet this:

| header | |foo     | |bar     | 

but when i'm trying set snippettext "foo \n bar", see foo bar , don't have ideas how make multiline. can me?

it looks need create own "info window" contents make work:

  1. create implementation of infowindowadapter overrides getinfocontents() return want go infowindow frame

  2. call setinfowindowadapter() on googlemap, passing instance of infowindowadapter

this sample project demonstrates technique. replacing snippets "foo\nbar" correctly processes newline. however, more likely, come layout avoids need newline, separate textview widgets each line in desired visual results.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -