绘制类似MapsApp的叠加层

5
我遇到了一项任务,看起来并不像我之前想象的那么简单。我需要制作一个使用MapActivity的应用程序,并在其上绘制一些覆盖层...(已完成),现在我在onTap()方法上遇到了问题,我需要让它看起来像Android原生地图应用程序的效果,就像这样http://i.stack.imgur.com/EkZEr.png 我是Android新手,似乎没有教程能够解释如何编写此类覆盖层的类...
1个回答

2
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);

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接