如何添加提示到的EditText与inputType =" numberDecimal"? [英] How to add hint into EditText with inputType="numberDecimal"?

查看:187
本文介绍了如何添加提示到的EditText与inputType =" numberDecimal"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个的EditText 象下面这样:

<EditText
android:id="@+id/et_sum"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:background="@android:drawable/editbox_background"
android:gravity="center_horizontal"
android:inputType="numberDecimal"
android:hint="Enter sum" />

但提示不显示。是否有可能显示的EditText 提示与 inputType =numberDecimal或不?

推荐答案

您可以使用

android:ellipsize="start"

进行与inputtype和重力所显示的提示

to make the hint displayed with an inputtype and gravity

这篇关于如何添加提示到的EditText与inputType =&QUOT; numberDecimal&QUOT;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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