List of usage examples for android.graphics.drawable BitmapDrawable getBounds
@NonNull public final Rect getBounds()
From source file:com.example.angelina.travelapp.map.MapFragment.java
/** * Helper method for creating start/end graphic used * to display the route on the map/* w w w . j a v a 2 s .co m*/ * @param p - point representing location on the map * @param pin - BitmapDrawable to use for the returned graphic * @return - a graphic representing the point */ private Graphic generateRoutePoints(final Point p, final BitmapDrawable pin) { final float offsetY = convertPixelsToDp(getActivity(), pin.getBounds().bottom); final PictureMarkerSymbol symbol = new PictureMarkerSymbol(pin); symbol.setOffsetY(offsetY); return new Graphic(p, symbol); }