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 5962995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:11:04+00:00 2026-05-22T19:11:04+00:00

Please have a look at the screenshot above, the string for the text is

  • 0

button

Please have a look at the screenshot above, the string for the text is “DELETE SELECTED\nMESSAGES” if I use wrap_content for width/height of its parent linearlayout, the text would look like:

DELETE

SELECTED

MESSAGES

(without line space between each word)

if I use match-parent for the button’s width, it will be stretched to match its parent, which is not what I want. Can anyone help me with this?

Thanks!

EDIT:

the layout of the button:

<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:gravity="center"
        android:layout_margin="5dip"
        android:paddingTop="5dip"
        android:paddingBottom="0dip"
        android:background="@drawable/solid_grey_btm_rounded">
        <Button
            android:text="@string/delete_selected_messages"
            android:id="@+id/btn_delete_message"
            android:gravity="center"
            android:layout_weight="1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            android:background="@drawable/button_grey_selector">
        </Button>
</LinearLayout>

I am working on Android 2.3.3 API Level 10, I was testing on a Motorola Milestone(the one with real keyboard)

  • 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-22T19:11:05+00:00Added an answer on May 22, 2026 at 7:11 pm

    I solved it my setting the button’s layout_width and layout_height to “match_parent” or “fill_parent”, also, added margin to make the button not fullfil its parent, added padding to make the text narrower.

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

Sidebar

Related Questions

Please have a look at this screenshot alt text http://www.maclife.com/files/u18/Yep3-big.jpg I think these are
Please have a look at the above screen shot, I would want to center
I have just started to look at .NET 3.5 so please forgive me if
Please check this screenshot! alt text http://img267.imageshack.us/img267/1391/difference.png This is the same page in Linux
Please have a look to the following code: <?php $nomeDominio=''; if (isset($_GET['infoDominio'])) { $nomeDominio
Please have a look at the followin code, where Extractor[A,B] is part of a
Please have a look at http://live.heritageartpapers.co.uk/catalogue.aspx and advise me on the following: Currently customers
Please have look on the following code: $_SESSION[process_y] = new Process(); $process_y = $_SESSION[process_y];
Please if you have used NHibernate and Entity Frameworks, please contrast your experiences.
Please help! Background info I have a WPF application which accesses a SQL Server

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.