I want to draw a second string adjacent to first string on the screen canvass. The starting point of the second string should be the width of the first string.I used paint.measuretext()
method of Android. But it returns the width which is lesser than the actual width. So my second String overlaps the first one. Can any body explain how to get the accurate width of a string?
testString1 = "44444444444444444444444444444444444444444";
testString2 = "Sample Test String";
canvas.drawText(testString1,0,50, paint);
int textWidth = (int)paint.measureText(testString1);
canvas.drawText(testString2,textWidth,50, paint);