久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如果 TextView 大于 1 行,如何在 TextView 上顯示省略

How can I show ellipses on my TextView if it is greater than the 1 line?(如果 TextView 大于 1 行,如何在 TextView 上顯示省略號?)
本文介紹了如果 TextView 大于 1 行,如何在 TextView 上顯示省略號?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我的以下布局不起作用:

I have the following Layout which does not work:

<LinearLayout 
    android:orientation="horizontal" 
    android:layout_width="match_parent" 
    android:id="@+id/experienceLayout" 
    android:background="#ffffff" 
    android:layout_height="match_parent" 
    android:paddingLeft="6dp" 
    android:paddingRight="6dp" 
    android:paddingBottom="6dp" 
    android:paddingTop="6dp">

    <TextView 
        android:layout_weight="1" 
        android:id="@+id/experienceLabel" 
        android:text="Experience" 
        android:layout_height="wrap_content" 
        android:textColor="#000000" 
        android:layout_width="wrap_content" 
        android:textStyle="bold">
    </TextView>

    <TextView 
        android:id="@+id/experienceTextView" 
        android:text="TextView" 
        android:layout_height="wrap_content" 
        android:textColor="#000000" 
        android:layout_width="wrap_content" 
        android:ellipsize="end" 
        android:lines="1" 
        android:maxLines="1" 
        android:singleLine="true" 
        android:fadeScrollbars="false">
    </TextView>

</LinearLayout>

推薦答案

這是一個常見的問題.嘗試使用以下內容:

This is a common problem. Try using the following:

android:scrollHorizontally="true"
android:ellipsize="end" 
android:maxLines="1"

........ scrollHorizo??ntally 是使它工作的特殊調味料".

.............. the scrollHorizontally is the "special sauce" that makes it work.

這篇關于如果 TextView 大于 1 行,如何在 TextView 上顯示省略號?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環繞文本?)
MyBatis, how to get the auto generated key of an insert? [MySql](MyBatis,如何獲取插入的自動生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數據庫)
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 久久网国产 | 无吗视频 | 一级做a爰片性色毛片16美国 | 亚洲一区二区三区国产 | 成人99 | 综合九九| 国产精品一区二区av | 日本精品一区二区三区在线观看 | 国产精品日韩高清伦字幕搜索 | 久久小视频 | 在线日韩中文字幕 | 一区二区三区视频在线观看 | 亚洲 欧美 日韩在线 | 国产大毛片| 成人亚洲片 | 欧美日韩国产一区二区三区 | 久久精品国产免费一区二区三区 | 日韩视频中文字幕 | 一区二区三区国产好的精 | 日韩免费中文字幕 | 久久只有精品 | 黑人精品欧美一区二区蜜桃 | 9191av| 五月天综合网 | 黄网址在线观看 | 亚洲不卡在线观看 | 欧美欧美欧美 | 中文字幕在线观看第一页 | 国产成人精品在线播放 | 欧美v日韩 | 久久中文字幕一区 | 国产精品一区二区视频 | 国产a级毛片 | 一区2区 | 伊人网站 | 久久久久久久久久久成人 | 亚洲欧美在线视频 | 午夜欧美 | 97综合在线 | 九九伊人sl水蜜桃色推荐 | 91资源在线观看 |