android textview 顯示一行,且超出自動截斷,顯示"..."


android textview 顯示一行,且超出自動截斷,顯示"..."

<TextView android:layout_width="wrap_content" 

android:layout_height="wrap_content" 

android:id="@+id/PopNameList" 
android:singleLine="true"
android:ellipsize="end"

android:textStyle="bold"  
android:textSize="15sp"
android:width="120dp"/>

 

以下顯示兩行,超出多余顯示。。。

<TextView android:id="@+id/question_listitem_title" 
         android:layout_width="fill_parent" 
       android:layout_height="wrap_content"
       android:includeFontPadding="false"
       android:textStyle="bold"
       android:textSize="@dimen/text_size_15"
       android:textColor="@color/listitem_black"
       android:maxLines="2"
      android:ellipsize="end"/>  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM