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 setError(@Nullable CharSequence errorMsg, @NonNull EditText editText, boolean forceClean) {
TextInputLayout viewParent = (TextInputLayout) editText.getParent();
if (forceClean) {
viewParent.setErrorEnabled(false);
viewParent.setError(null);
}
viewParent.setErrorEnabled(true);
viewParent.setError(errorMsg);
}
protected void clearError(@NonNull EditText editText) {
TextInputLayout viewParent = (TextInputLayout) editText.getParent();
viewParent.setErrorEnabled(false);
viewParent.setError(null);
}
I'm getting an error when I'm trying to cast the parent of EditText to TextInputLayout, in the layout I have this kind of code for that:
So, this worked perfectly fine, but now it throws ClassCastException:
java.lang.ClassCastException: android.widget.FrameLayout cannot be cast to android.support.design.widget.TextInputLayout
I'm wondering if there some new guides on that?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)