I asked a question 1-2 days ago, it was answered. My codes are there. This is text link of my question
I added overlays on the map and when I click any overlay, I can get the id of it but there is a problem. I want to get the overlay's id and I want to send it to another class but, not via bundle.
I'm using fragments.
Here is my onTap function.
@Override
public boolean onTap(int index) {
OverlayItem item = mapOverlays.get(index);
int id = Integer.valueOf(item.getSnippet());
Toast.makeText(context, "Ilan ID : " + id, Toast.LENGTH_LONG).show();
MainActivity ma= new MainActivity();
Param param = null;
param.setAdvertID(String.valueOf(id));
// change page
ma.onTabChanged(TabEnum.ANASAYFA.toString());
//Log.e("Tap", "Tap Performed"+id);
return true;
}
I want to send id parametres from ItemizedOverlay class-onTap function- to another class. How can I do it?
Edit : These are not working!, i couldn't do it. :(
MainActivity ma= new MainActivity();
Param param = null;
param.setAdvertID(String.valueOf(id));
ma.onTabChanged(TabEnum.ANASAYFA.toString());
Thanks everyone.