I have two versions of the application I'm working on. The first version has a setError message, which is set in the EditText interface line if the user is trying to save data and the line is empty. gradle dependencie uses version 24.0.0.
The message is displayed correctly:

The second version of the application has the same setError code, but the view looks distorted because it looks like the "Edit Text" line has been shifted down, so it is no longer directly below the "Do" text and with a red circular exclamation point moves down to the left of the message about an error. This version uses the dependency version of gradle 24.2.0.

Any ideas on what could be causing this?
Regarding Mike M, below I used setError () in a TextInputLayout, but this leads to a completely different error message that appears below the start of the EditText line that I would not use:

Activity.java
... public void onClickSave(View v) { int stringTD = EditText.getText().toString().replace(" ", "").length(); if (stringTD == 0) { EditText.requestFocus(); EditText.setError("Add a Do Item");
layout.xml
... <android.support.design.widget.TextInputLayout android:id="@+id/TD_text_input_layout" android:layout_width="match_parent" android:layout_height="wrap_content" android:textColorHint="@color/colorFlLabelFinal" app:hintTextAppearance="@style/FloatingLabel" > <com.EditText android:id="@+id/EditText" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingTop="2dp" android:inputType="text|textCapSentences|textNoSuggestions" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#FFFFFF" android:textIsSelectable="true" android:textColorHighlight="@color/colorPrimary" android:paddingLeft="5dp" android:paddingStart="5dp" android:drawableStart="@drawable/24dp" android:drawableLeft="@drawable/24dp" android:drawablePadding="5dp" android:maxLines="1" android:maxLength="51" android:imeOptions="actionNext|flagNoExtractUi" android:nextFocusDown="@+id/DEditText" />
source share