I have a menu item with a somewhat long name, be it "My very very, very extremely first android menu item inflated!".
The problem: the text is presented in a single line, and cut at the area of 'menu'.
But even if the text would fit, I'd still not want it to occupy all the space from left
to right, and prefer a line break somewhere reasonable.
The question: how do I trigger a line break in the XML file (values/strings.xml)?
The line is simple:
<item android:id="@+id/MyFirstItem" android:title="My very very, very extremely first android menu item inflated!"/>
Eclipse rejects anything starting with a '<'
inside the string so that's a no-go.
Also, I don't want to leave the bounds of XML.
Thanks in advance
Simply \n works for me.
Edit: For general XML usage you would want to use parameters like
android:layout_width="wrap_content"
android:layout_height="wrap_content"
instead of adding your own linebreaks (of course, this doesn't apply to strings.xml, but for your layout). It's time-consuming and may lead to your application looking 'wrong' on different phones / resolutions. Just in case you didn't use it already, not implying you are doing anything wrong. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With