osmeditor4android
osmeditor4android copied to clipboard
Word wrap preference titles (was Length of a translation)
The original text is sometimes a short text "Always dim non-downloaded areas" But the translation can be longer : "Toujours assombrir les zones non téléchargées"
On my phone, if I use it in a portrait mode, I can see "Toujours assombrir les zones non...".
It should be great to see the text on 2 lines rather than with a ... at the end.
In general in the form/preset based tab we allow two lines for the key. Could you give an example where that isn't the case?
Hope it will help (3 titles of a preference are with an ellipsis) :

In the Preferences, I didn't find any title on 2 lines
On that screenshot, you can see another problem = the title at the top is also on one line so not complete (Paramètres de données et...).
(And if I try with 2 fingers on my screen to increase or decrease the size of the texts, nothing happens : I need to turn my phone then to go up or go down to find the line to be able to read it) : to have the texts on 2 lines when needed will be better I think.
Ah I was thinking of something else.
I don't think it is a good idea to try and split titles over two lines, I'm fairly sure this would at least need explicit line breaks to force Android to do this. I would suggest simply re-formulating the title string to be shorter and if necessary adding text to the description.
Potential solution (though the caveats above still apply), see https://stackoverflow.com/questions/19616238/how-to-wrap-a-preference-title-really
I'm fairly sure this would at least need explicit line breaks to force Android to do this. I would suggest simply re-formulating the title string to be shorter and if necessary adding text to the description.
I don't know how it works but, in the description, we don't add any line breaks but the text can be automatically on 2, 3 or more lines (see for example the first setting on 3 lines on my capture = "Remplir automatiquement certains attributs quand un nom suggéré est choisi") or on one line (fourth setting = "5 Notifications").
Why it works for description and it won't for the titles ?
Note : I talked about lengh of translations but you could use it for the original texts, even if all your original texts are currently short enough (except maybe "Max distance for stored imagery offsets", not sure it works on all phones).
Note2 : in the link to "stackoverflow", we can see, in the "Before" example, that the text is not the same on Android 4 (A Long Preference Title that should w) and on Android 5 (A Long Preference Title that should wrap to...). So it seems to me impossible to ask translators to try to add a line break at the good place, or even to try to find a shorter title, because if it works on my phone, maybe the break will not work on another phone with another Android version.
I just had an in depth look at this, neither method will currently work as the top title view is actually an action bar that doesn't expose its inner workings, so we can't change any settings of the TextView holding the title (there are obviously hacks around this that I however would like to avoid).