Issue
I want to show a simple text view on map view pushpin.on click of that pushpin i want to show the detail info.
when user taps on specific point i want to show name of that point..these name I'm storing in POJO class and i want to retrieve from that,now in my code I'm successfully getting names but only problem is names are not displaying on that particulate tap point.
Please Help...
here is my code....
@Override
public boolean onTap(GeoPoint p, MapView mapView) {
str.
final PopupWindow popupWindow;
LayoutInflater inflater = getLayoutInflater();
View layout = inflater.inflate(R.layout.popup, (ViewGroup) findViewById(R.id.rootId));
TextView text = (TextView)layout.findViewById(R.id.nameTextView);
text.setText("Lake Name");
text.setBackgroundColor(Color.BLACK);
popupWindow=new PopupWindow(layout);
popupWindow.setTouchable(true);
popupWindow.setWidth(LayoutParams.WRAP_CONTENT);
popupWindow.setHeight(LayoutParams.WRAP_CONTENT);
popupWindow.showAtLocation(layout,Gravity.CENTER_HORIZONTAL,10,0);
builder=new AlertDialog.Builder(DummyLocationActivity.this);
text.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
popupWindow.dismiss();
LayoutInflater inflater=LayoutInflater.from(DummyLocationActivity.this);
View desc= inflater.inflate(R.layout.description,(ViewGroup) findViewById(R.id.root));
builder.setView(desc);
builder.show();
}
});
return true;
}
Solution
OnTap(int position) you can get the particular item on tap by using the position .
Answered By - Sujit
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.