Note that there are some explanatory texts on larger screens.

plurals
  1. POlinearlayout problem
    primarykey
    data
    text
    <p>I have a weired problem with the layout of my app. I have a listview, in which I have inserted an own layout for each item. This works nice.</p> <p>Here is a part of the inserted XML layout:</p> <pre><code> &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/label" android:paddingTop="2px" android:paddingLeft="15px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="16sp" /&gt; &lt;TextView android:id="@+id/price" android:paddingTop="2px" android:paddingLeft="15px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="12sp" /&gt; &lt;TextView android:id="@+id/days" android:paddingTop="2px" android:paddingLeft="15px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="12sp" /&gt; &lt;TextView android:id="@+id/test" android:paddingTop="2px" android:paddingLeft="15px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="12sp" /&gt; &lt;TextView android:id="@+id/status" android:paddingTop="2px" android:paddingLeft="15px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="12sp" /&gt; &lt;/LinearLayout&gt; </code></pre> <p>In my activity I am doing following:</p> <pre><code>tv = (TextView) row.findViewById(R.id.price); tv.setText(getString(R.string.wishlist_price) + ": " + "293.99€"); </code></pre> <p>getString(R.string.wishlist_price) is defined in string.xml as "Price"</p> <p>Now the strange thing: For the above "293.99€" the output on the phone looks like this:</p> <pre><code>Price: 293.99€ </code></pre> <p>But if I change the money, for example to 22.95€, the output looks like this:</p> <pre><code>Price: 22.95€ </code></pre> <p>So it does a newline after "Price:" I cant found out what is causing this.</p> <p>I tried it with "2.99€", it gives the intended output:</p> <pre><code>Price: 2.99€ </code></pre> <p>Does someone has an idea what is causing the newline in the example "22.95€"?</p> <p>EDIT: There are two linearlayout around the one above. Perhaps they cause this strange behavior:</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" &gt; &lt;LinearLayout android:id="@+id/product_item" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" &gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload