Serj Lotutovici
Serj Lotutovici

Reputation: 4380

Draw a MapsApp-like Overlay

I'm stuck with an task, that seem's to me not so trivial as i though before. I need to make an app which uses MapActivity, and draw some overlays on it... (that's done), now I have a problem with the onTap() method, I need to make it look like in the original Maps App for Android, Like this https://i.sstatic.net/EkZEr.png

I'm new to android, and it seems there's no tutorial which could explain how to write classes for such overlays...

Upvotes: 5

Views: 145

Answers (1)

himanshu
himanshu

Reputation: 97

in onTap()

LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
LinearLayout ll = (LinearLayout)inflater.inflate(R.layout.mylocation_balloon, null);
LayoutParams lp = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT,mapOverlays.get(index).getPoint(), 0, -70, LayoutParams.MODE_MAP | LayoutParams.CENTER);

Upvotes: 2

Related Questions