Hello,
I 'd like to know how can I render a text over a 48x48 bitmap in my android application, considering sometimes the text exceeds the bitmap width .In such cases I need to render only a part of the text followed by dots such that all fits the available width !
Thanks !
Update Edit : the code I use is :
Bitmap renderSurface = icon.createBitmap(); Canvas canvas = new Canvas(renderSurface);
Paint paint = new Paint();
paint.setTextSize(10);
if(paint.measureText(nativeName)>canvas.getWidth())
nativeName = getClippedString(paint,nativeName,canvas.getWidth() );
canvas.drawText(nativeName,33,0, paint);
return renderSurface;