android - Ellipsize text inside TextView instead of clipping -


in listview row have title , subtitle. if title takes 2 lines i'd subtitle textview shrink , text inside ellipsized fit remaining space. title should have priority on subtitle. how prevent subtitle clipped?

enter image description here

here s row:

<relativelayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="90dp"     android:background="#fff">      <view         android:id="@+id/news_unread_indicator"         android:layout_width="5dp"         android:layout_height="match_parent"         android:layout_alignparentleft="true"         android:background="@color/unread_news" />      <relativelayout         android:layout_width="match_parent"         android:layout_height="90dp"         android:orientation="vertical"         android:paddingbottom="10dp"         android:paddingleft="15dp"         android:paddingright="15dp"         android:paddingtop="10dp">           <com.gigaset.elements.ui.custom.checkboxmuseo             android:id="@+id/news_delete_chckbox"             android:layout_width="32dp"             android:layout_height="32dp"             android:layout_centervertical="true"             android:layout_marginright="3dp"             android:adjustviewbounds="true"             android:focusable="false"             android:visibility="gone" />          <com.gigaset.elements.ui.custom.textviewmuseo             android:id="@+id/news_title"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_torightof="@id/news_delete_chckbox"             android:ellipsize="end"             android:maxlines="2"             android:textcolor="@color/text"             android:textsize="18sp" />          <com.gigaset.elements.ui.custom.textviewmuseo             android:id="@+id/news_description"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_alignleft="@id/news_title"             android:layout_below="@id/news_title"             android:ellipsize="end"             android:maxlines="2"             android:textcolor="@color/newsfeed_news_subtitle"             android:textsize="15sp" />     </relativelayout>  </relativelayout> 


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -