1

Android - Bitmaps create

view story
linux-howto

http://stackoverflow.com – I am creating Custom markers for Google Maps. I want the overall shape and colour of the marker to be like this but the width of it to be able to change as the text length will vary. How can I do this? At the moment, I'm using a simple Bitmap.createBitmap This is my current code (well I found and modified) public static Bitmap toBitmap(String text) { Bitmap.Config conf = Bitmap.Config.ARGB_8888; Bitmap bmp = Bitmap.createBitmap(200, 50, conf); Canvas canvas = new Canvas(bmp); Paint paint = new Paint(); paint.setColor(Color.WHITE); paint.setStyle(Style.FILL); (HowTos)