开发者

How to call an activity from a class extending Overlay

开发者 https://www.devze.com 2023-01-28 05:01 出处:网络
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

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

精彩评论

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