I'm in a position where I have a horizontal scroll view with a list of labels inside. These labels are navigation buttons, so would generally be words like Next, Previous, Submit, Cancel, but they are user controlled so could be anything for example the name of the next page. Essentially I can't let these labels grow as wide as they want (each one based on dynamic data) so have put a maxwidth on each one.
I'm trying to decide on the maxwidth of the buttons to give a fair amount of characters.
What is a fair character count to allow before cropping?
Example
Addition: Note these labels maybe single or multiple words.
Answer
One potential approach would be to use the average (mode) word length as your maximum (or n+1) then the majority of labels will be displayed.
There are a number of sources for what that number is, but from this paper, it indicates that it would be 8 or 9 characters.
Alternatively calculate the average character length from your existing labels and take the mean from that on a rolling basis.
No comments:
Post a Comment