关于Android map

LarrieJ 2012-07-31 02:01:15
private ArrayItemizedOverlay createPOIOverlay() {
return new ArrayItemizedOverlay(getResources().getDrawable(
R.drawable.map_pin_blue)) {
@Override
protected boolean onTap(int index) {
final PointOfInterest poi = selectedPOIs.get(index);
AlertDialog.Builder dialog = new AlertDialog.Builder(
MapDisplayActivity.this);

DialogInterface.OnClickListener showPhotos = new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// TODO Project Phase Two : you need to insert code here that will
// display the three closest photographs to the current poi
// START ADDING CODE HERE


// STOP ADDING CODE HERE
dialog.cancel();
}
};

DialogInterface.OnClickListener cancel = new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
};

dialog.setPositiveButton("Nearest Photos", showPhotos);
dialog.setNegativeButton("Cancel", cancel);

dialog.setTitle(poi.getDisplayName());
dialog.setMessage(poi.getDescription());
dialog.show();
return true;
}
};

method:
public void onClick(DialogInterface dialog, int id) {
}
怎么写啊?!!!
...全文
51 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

51,410

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧