Я новичок в Android. Я делаю проект для многоадресной рассылки. Теперь мне нужно, чтобы при отображении на маркере на карте отображался пузырь.Мне не нужно диалоговое окно, мне нужно всплывающее окно с кнопкой и текстовым представлением. Хочу сначала отобразить текстовое представление. Не знаю, что я делаю с этим кодом. Пробовал столько раз. Но не получил никакой идеи.мой код onTap:
protected boolean onTap(int index)
{
System.out.println("Tapped");
//To display the bubble for robots:
//LayoutInflater inflater = this.getLayoutInflater();
//bubble_view = (LinearLayout) inflater.inflate(R.layout.window_view, bubble_view );
TextView venueName = (TextView) bubble_view.findViewById(R.id.name1);
venueName.setText("Hello SK");
GeoPoint rPoint = null;
MapView.LayoutParams params = new MapView.LayoutParams(
LayoutParams.WRAP_CONTENT, 200,
rPoint, MapView.LayoutParams.BOTTOM_CENTER);
bubble_view.setLayoutParams(params);
System.out.println("sgdhgsetlumstmwejfsd");
map.addView(bubble_view);
Runnable r = new Runnable() {
public void run() {
bubble_view.setVisibility(View.VISIBLE);
}
};
//Projection projection = ((MapView) map).getProjection();
//Point p = new Point();
//projection.toPixels(rPoint, p);
//p.offset(0, -(bubble_view.getMeasuredHeight() / 2));
//GeoPoint target = projection.fromPixels(p.x, p.y);
//mapController = ((MapView) map).getController();
//mapController.setZoom(16);
//mapController.animateTo(target, r);
//Toast.makeText( mContext,"Device Name: "+index,Toast.LENGTH_SHORT).show();
//return bubble_view != null;
return true;
}
private LayoutInflater getLayoutInflater() {
// TODO Auto-generated method stub
return null;
}
}
Вот мой код. Это с ошибками. Определить LayoutInflator можно только в onCreate.помоги мне сделать это правильно.