EditText.setError() on single line
I have a question about EditText.setError()
.
I have an EditText :
开发者_Python百科<TextView android:id="@+id/sc_num"
style="@style/textLabel"
android:text="@string/scnum"
android:layout_below="@+id/creditCard"/>
<EditText android:id="@+id/credit"
android:background="@android:drawable/editbox_background"
android:layout_below="@+id/sc_num"
android:layout_alignRight="@+id/state"/>
I want to display the error message "please enter a valid security code"
using the setError()
method.
When I run the app I'm getting an error displayed in multiple lines as shown in the picture
What would I do to display this error in single line?
Try android:scrollHorizontally="true"
.
EDIT:
Use android:SingleLine="true"
.
精彩评论