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

  • Home
  • SEARCH
  • 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 6821679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:34:23+00:00 2026-05-26T21:34:23+00:00

I have a simple horizontal LinearLayout with four TextViews with the same style inside.

  • 0

I have a simple horizontal LinearLayout with four TextViews with the same style inside. When the text in a TextView needs two lines, the TextView gets smaller:

enter image description here

I can’t understand why. Anybody can help?

Thanks

Layout

<LinearLayout android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="10dp">

    <TextView style="@style/compte_ba_cell"
        android:background="@color/grey_header"
        android:textStyle="bold" android:text="@string/montant" />

    <TextView style="@style/compte_ba_cell"
        android:background="@color/grey_header"
        android:textStyle="bold" android:text="@string/origine" />

    <TextView style="@style/compte_ba_cell"
        android:background="@color/grey_header"
        android:textStyle="bold" android:text="@string/echeance" />

    <TextView style="@style/compte_ba_cell_last"
        android:background="@color/grey_header"
        android:textStyle="bold" android:text="@string/statut" />

</LinearLayout>

Style

<style name="compte_ba_cell">
    <item name="android:layout_width">71.5dp</item>
    <item name="android:layout_height">50dp</item>
    <item name="android:textColor">#000000</item>
    <item name="android:background">#FFFFFF</item>
    <item name="android:layout_marginRight">2dp</item>
    <item name="android:textSize">12sp</item>
    <item name="android:typeface">serif</item>
    <item name="android:gravity">center</item>
</style>
 <style name="compte_ba_cell_last" parent="@style/compte_ba_cell">
    <item name="android:layout_marginRight">0dp</item>
</style>
  • 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-26T21:34:24+00:00Added an answer on May 26, 2026 at 9:34 pm

    If you change your third TextView to contain android:layout_height="fill_parent" this will fix your problem. I suppose the problem comes from something connected with “wrap_content” but I am not sure, if this is default value for layout_height. Also it does not make sense, why in the other cases, it will not wrap around the content and also be smaller.

       <TextView style="@style/compte_ba_cell"
            android:background="@color/grey_header"
            android:layout_height="fill_parent"
            android:textStyle="bold" android:text="@string/echeance" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple LinearLayout with one TextView and one ImageView. I want the
I have a simple input form; it's a vertical LinearLayout with EditTexts inside a
I have a simple list I am using for a horizontal menu: <ul> <h1>Menu</h1>
I have simple issue setting a two-way databinding of a checkbox in Silverlight 3.0.
I have a simple horizontal UL LI main nav which I am trying to
Let's say I have a simple TextBox next to a Label: <StackPanel> <StackPanel Orientation=Horizontal>
I have a simple horizontal menu and when I hover each one of the
I have a simple, horizontal <Line> element. This line has a RotateTransform applied to
I have a simple combobox with a checkbox inside as such: <ComboBox Height=23 HorizontalAlignment=Left
I have a simple layout: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent> <LinearLayout

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.