本文介紹了EditText 橢圓大小(三個點...)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
限時送ChatGPT賬號..
不幸的是,我無法為 EditText 制作橢圓大小.當(dāng)文本太長時,甚至可以在文本末尾放置三個點?它適用于 TextiView,但不適用于 EditText.有什么想法嗎?
Unfortunatelly I am not able to make ellipsize for EditText works. Is even possible to put three dots at the end of the text when the text is too long? It is working perfectly for TextiView but not for EditText. Some idea?
android:id="@+id/ed_email_personalInfo"
android:layout_width="match_parent"
android:layout_height="55dp"
android:background="@color/transparent"
android:ellipsize="end"
android:ems="10"
android:hint="@string/email"
android:inputType="textEmailAddress"
android:maxLength="64"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:textColorHint="@color/col9a9a9a"
android:textSize="15.7sp"
推薦答案
你必須刪除 android:inputType
屬性.
如果定義了 inputType,Ellipsize 將不起作用.
這篇關(guān)于EditText 橢圓大小(三個點...)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!