开发者

How to call an activity from a class extending Overlay

I have a requirement of getting a full screen image on clicking the tagged points on the map...I short to call an activity from a class extending Overlay,however i am getting the following error

"The method startActivity(Intent) is undefined for the type MapLocationFace"

when i use this piece of code to call the activity from the onTap function :

Intent intent = new Intent(); intent.setClass(mapView.getContext(), getnohsib.class); startA开发者_开发知识库ctivity(intent);

Note : MapLocationFace class is extending Overlay...

whats the solution....thanks in advance...


startActivity method is to be called on a context object. try calling the startActivity like this mapView.getContext().startActivity(intent);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜