I updated support lib version to 24.2.0 and my registration screen is dead now. The problem is in the TextInputLayout, I have two methods:
protected void
You can check the code of the TextInputLayout v24.2.x.
Now it works with a FrameLayout.
public TextInputLayout(Context context, AttributeSet attrs, int defStyleAttr) {
// Can't call through to super(Context, AttributeSet, int) since it doesn't exist on API 10
super(context, attrs);
//...
mInputFrame = new FrameLayout(context);
mInputFrame.setAddStatesFromChildren(true);
addView(mInputFrame);
//....
}
@Override
public void addView(View child, int index, final ViewGroup.LayoutParams params) {
if (child instanceof EditText) {
mInputFrame.addView(child, new FrameLayout.LayoutParams(params));
//...
} else {
// Carry on adding the View...
super.addView(child, index, params);
}
}
where mInputFrame is a FrameLayout.
It is the reason of your issue (the parent is a FrameLayout).
java.lang.ClassCastException: android.widget.FrameLayout cannot be cast to android.support.design.widget.TextInputLayout
You should use the TextInputLayout as parameter instead of navigating in the view hierarchy.