a layout with ellipsis then a counter
<p>I'm new to Android, please help me to design below layout. Many thanks.</p>

<p>I want to implement a layout, it shows a text followed by a counter. If the text is too long, show ... followed by counter. like below:</p>

<p>Expected layout:</p>

<p>Short text (3)              // when screen width is enough </p>

<p>Long text blah bl...(2)     // when screen width isn't enough </p>

<p>Below are my xml. It shows normally for above 1, when text is short. When text is long, the problem are:
1) it doesn't show "..." at the end of text
2) counter (2) isn't shown on screen.</p>

<blockquote>
  <p>
</blockquote>

<pre><code>    &lt;TextView android:id="@+id/text" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:text="very long body safbadaf asfasf safasfd"
        android:layout_gravity="left"
        android:paddingLeft="4dp" android:paddingTop="8dp"
        android:paddingRight="4dp" android:paddingBottom="8dp"
        android:textStyle="bold" android:singleLine="true" android:ellipsize="end"/&gt;
    &lt;TextView android:id="@+id/count" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:text="count"
        android:layout_gravity="center_horizontal"
        android:paddingLeft="4dp" android:paddingTop="8dp"
        android:paddingRight="4dp" android:paddingBottom="8dp"
        android:textStyle="bold" android:singleLine="true" android:layout_weight="1" /&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>William</p>
