How to display Toast in different- 2 position
android
Solution
This code is giving me exact position of toast... This code is giving me exact gravity of toast..
OverlayItem item = overlayItems_.get(index);
Projection projection = mMapView.getProjection();
Point point = new Point();
projection.toPixels(item.getPoint(), point);
Toast toast = Toast.makeText(mContext, item.getTitle()+" "+item.getSnippet(), Toast.LENGTH_SHORT);
toast.setGravity(Gravity.TOP | Gravity.LEFT, point.x, point.y);
toast.show();
Here i am passing points also..
Problem
My map activity displaying n number of overlay, when I am tapping on overlay icon then toast is displaying on bottom of screen, But I want to display the Toast near by overlay icon where I am tapping.