マップ マーカーをタップした後、マップ アプリケーションでカスタマイズされたダイアログを表示しようとしています。Android開発者ガイドに従って、 onTap(int index) のコードを次に示しますが、これは機能していません。ここで何が問題なのですか? 助けてください !
@Override
protected boolean onTap(int index) {
// TODO Auto-generated method stub
OverlayItem item = mOverlays.get(index);
Context mContext = getApplicationContext();
Dialog dialog = new Dialog(mContext);
dialog.setContentView(R.layout.marker_view);
dialog.setTitle(item.getTitle());
TextView textAddress = (TextView) dialog.findViewById(R.id.tv_marker_address);
TextView textPhone = (TextView) dialog.findViewById(R.id.tv_marker_phone);
textAddress.setText(item.getSnippet());
ImageView image = (ImageView) dialog.findViewById(R.id.marker_image);
dialog.show();
Button btn = (Button)dialog.findViewById(R.id.btn1);
btn1.setOnClickListener(this);
return true;
}
}