I need to draw text to a canvas (of a custom view), and need to first trim it to a maximum width, adding an ellipsis at the end if necessary. I see you can do it for a TextView, but I want to do it inside a custom view's onDraw() without having to add a child view.
Is this possible? I know I could measure the string, chop off a character, measure again, etc until it is the right size....and I'm sure there are more efficient ways as well...but I'd like to avoid reinventing that wheel if I can.