如何使 android EditText 的高度小于默认值? [英] How to make android EditText smaller than default in height?

查看:21
本文介绍了如何使 android EditText 的高度小于默认值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何让 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 的高度小于默认值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆