Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4002576
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:02:46+00:00 2026-05-20T08:02:46+00:00

I have a menu item with a somewhat long name, be it My very

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:02:46+00:00Added an answer on May 20, 2026 at 8:02 am

    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. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asp.net Menu Item <asp:MenuItem NavigateUrl= Text=Download Value=Download/> . When this item gets
I have a menu item Home in my main menu AND in my top
I have a menu item to which I add another item. Now I want
I have a menu item which has children menu items. When one of the
I have a Menu page. If a user selects an Menu Item it opens
I've defined a custom content type - news. I also have a menu item
I have an asp:Menu and it contains a top level menu item that points
I have a main menu window. On clicking any menu item it opens a
I have a simple unordered list with list items as menu item i created
I have seen a few OSX apps that have a Special Characters menu item

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.