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:

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