drawrect - Displaying text in multiple lines in Android -
i have graphical android project , primary trick providing user interface functionality use drawrect , drawtext draw rectangle label on screen. then, capture touch events , check see if occur in rectangle -- when do, voila, have button.
it may not elegant method, seems working charm. however, not of labels on 1 line, , i'd write them on two. suppose write 2 separate lines , manually work out arranging text nicely spaced , centered, i'd avoid if possible.
in android, there simple way split text label , write out in single step??
thanks, r.
i don't think there easy way achieve this, have measure text , draw offset buttonwidth - textwidth / 2.
Comments
Post a Comment