<android.support.design.widget.TextInputLayout android:layout_width="0dp" android:layout_height="@dimen/textinput_container_height" android:layout_weight="1" app:errorEnabled="true" app:errorTextAppearance="@style/TextAppearance.AppCompat.Small.ErrorStyle" tools:hint="@string/ip_printers"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="-5dp" android:digits="1234567890.:" android:ellipsize="end" android:imeOptions="actionSearch" android:inputType="number|numberDecimal" android:maxLength="40" android:maxLines="1" app:errorTextAppearance="@style/TextAppearance.AppCompat.Small.ErrorStyle" tools:text="1234567890" /> </android.support.design.widget.TextInputLayout> 

wrong ip

Guys, tell me how you can move the error text to the left edge in line with the text above. The error itself is displayed in TextInputLayout. By setting a negative margin, the whole block moves, which I do not need.

  • Indents in TextInputLayout - pain. Maybe it will be possible to achieve the desired result by moving the text in the EditText to the right padding ? - Yuriy SPb
  • Show your @style/TextAppearance.AppCompat.Small.ErrorStyle . I think the problem is in it, because by default errorText has no indentation. And why is TextInputLayout 0dp wide? - eugeneek
  • <style name = "ValidationTextInputStyle"> <item name = "errorTextAppearance"> @ style / TextAppearance.AppCompat.Small.ErrorStyle </ item> </ style> <style name = "TextAppearance.AppCompat.Small.ErrorStyle"> <item name = "android: textColor"> @ color / text_error </ item> <item name = "android: textSize"> 12sp </ item> </ style> Text width is 0dp, because Another search button implemented on the right. - Vadym Gryganskiy February

0