Can't say it much more clearly than in the title. I have an EditText wrapped by a Text Input Layout. I'm trying to trigger an event when that EditText loses focus. However, once the event listener is applied, the TextInputLayout no longer animates the text, it just sits on the editText line until information is entered, at which time it does animate. Can anyone give me some insight as to why this is happening?
Edit: Layout file.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/card_drawable"
android:gravity="center"
android:padding="11dp"
android:text="The fields below will be used to calculate your training maxes. Please enter your best rep record, or 1RM, for each lift. Training maxes will be determined using the following formula provided in Beyond 5/3/1: \n(Weight Lifted x Reps X .0333 + Weight Lifted)" />
<LinearLayout
android:id="@+id/squat_container"
style="@style/linear_layout_style">
<android.support.design.widget.TextInputLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<EditText
android:id="@+id/squatWeight_editText"
style="@style/editText_floating_label"
android:hint="Squat Weight" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/txtInputLayoutSquat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<EditText
android:id="@+id/squatReps_editText"
style="@style/editText_floating_label"
android:hint="Repetitons" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/bench_container"
style="@style/linear_layout_style">
<android.support.design.widget.TextInputLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<EditText
android:id="@+id/bechpressWeight_editText"
style="@style/editText_floating_label"
android:hint="Bench Press Weight" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<EditText
android:id="@+id/benchpressReps_editText"
style="@style/editText_floating_label"
android:hint="Repetitons" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/deadlift_container"
style="@style/linear_layout_style">
<android.support.design.widget.TextInputLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<EditText
android:id="@+id/deadliftWeight_editText"
style="@style/editText_floating_label"
android:hint="Deadlift Weight" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<EditText
android:id="@+id/deadliftReps_editText"
style="@style/editText_floating_label"
android:hint="Repetitons" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/ohp_container"
style="@style/linear_layout_style">
<android.support.design.widget.TextInputLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<EditText
android:id="@+id/ohpWeight_editText"
style="@style/editText_floating_label"
android:hint="Overhead Press Weight" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<EditText
android:id="@+id/ohpReps_editText"
style="@style/editText_floating_label"
android:hint="Repetitons" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>
</LinearLayout>
EditText
wrapped inTextInputLayout
, it will animate. So, whether is there only one focus onEditText
in the full screen or not? If not, try to add another focusableView
and then see.