单行上的EditText.setError()
我有一个关于EditText.setError()
的问题。
我有一个EditText:
我想使用setError()
方法显示错误消息“ 请输入有效的安全代码 ”。
当我运行应用程序时,我收到的错误显示在多行中,如图所示
如何在单行中显示此错误?
试试android:scrollHorizontally="true"
。
编辑:使用android:SingleLine="true"
。
我有一个关于EditText.setError()
的问题。
我有一个EditText:
我想使用setError()
方法显示错误消息“ 请输入有效的安全代码 ”。
当我运行应用程序时,我收到的错误显示在多行中,如图所示
如何在单行中显示此错误?
试试android:scrollHorizontally="true"
。
编辑:使用android:SingleLine="true"
。