久久久久久久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 上顯示省略號?的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我的以下布局不起作用:

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>

推薦答案

這是一個(gè)常見的問題.嘗試使用以下內(nèi)容:

This is a common problem. Try using the following:

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

........ scrollHorizo??ntally 是使它工作的特殊調(diào)味料".

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

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

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

相關(guān)文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環(huán)繞文本?)
MyBatis, how to get the auto generated key of an insert? [MySql](MyBatis,如何獲取插入的自動(dòng)生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數(shù)據(jù)庫)
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 亚洲天堂中文字幕 | 国产精品夜间视频香蕉 | 精品久久久久一区二区国产 | 久久久亚洲一区 | 欧美精品一区二区三区在线播放 | 毛片视频网站 | 欧美色综合一区二区三区 | 青娱乐av | 亚洲一区成人 | 国产日韩一区 | 午夜国产一级 | 成人一级视频在线观看 | 久久精品青青大伊人av | 精品伊人 | 欧美精品成人影院 | 国产精品欧美一区二区三区不卡 | 国产精品久久久久久婷婷天堂 | 日韩免费福利视频 | 久久狠狠 | 午夜手机在线视频 | 蜜臀久久99精品久久久久野外 | 99精品网 | 91麻豆精品国产91久久久更新资源速度超快 | 欧美11一13sex性hd | 日韩精品在线一区 | www.日本国产 | 四虎av电影| 亚洲欧美一区二区三区1000 | 99精品亚洲国产精品久久不卡 | 91久久久久久久久久久 | 精品久久九 | 久久久久国产一区二区三区四区 | 免费黄色av网站 | 中文成人在线 | 欧美激情欧美激情在线五月 | 日韩影音 | 91视频免费视频 | 一级黄色片免费在线观看 | 久久黄色精品视频 | 久久久国产精品 | 97碰碰碰|