Code example for Bitmap

Methods: copygetHeightgetWidth

0
		int i = 0;
		do { 
			base = baseBitmaps[i];
		} while (markersCount >= forCounts[i++]);
 
		Bitmap bitmap = base.copy(Config.ARGB_8888, true);
 
		String text = String.valueOf(markersCount);
		paint.getTextBounds(text, 0, text.length(), bounds);
		float x = bitmap.getWidth() / 2.0f;
		float y = (bitmap.getHeight() - bounds.height()) / 2.0f - bounds.top;
 
		Canvas canvas = new Canvas(bitmap);
		canvas.drawText(text, x, y, paint);
 
		BitmapDescriptor icon = BitmapDescriptorFactory.fromBitmap(bitmap);
		return markerOptions.icon(icon);
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java