本文介紹了如何使 android EditText 的高度小于默認值?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
限時送ChatGPT賬號..
如何讓 android EditText 的高度小于默認值?
How to make android EditText smaller than default in height?
如果我改變高度,我看不到我的文字,但底部有多余的空白.
If I change the height, I can't see my text, but it has extra blank on bottom.
推薦答案
EditText 有一個默認的填充設置.
EditText has a default padding set.
試試這個,
<EditText
android:text="Any Text"
android:layout_width="fill_parent"
android:layout_height="16dp"
android:padding="2dp"
android:background="#FFF"
android:textSize="10dp"
/>
這篇關于如何使 android EditText 的高度小于默認值?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!