janheinrichmerker / android-issue-reporter

A powerful and simple library to open issues on GitHub directly from your app.
MIT License
118 stars 27 forks source link

Support v24.2.0 compatibility #44

Closed ronaldsmartin closed 8 years ago

ronaldsmartin commented 8 years ago

Since updating my support library dependencies to 24.2.0, I am encountering the following error when trying start my IssueReporterActivity subclass:

java.lang.ClassCastException: android.widget.FrameLayout cannot be cast to android.support.design.widget.TextInputLayout at com.heinrichreimersoftware.androidissuereporter.IssueReporterActivity.setGuestEmailRequired(IssueReporterActivity.java:298)

The error occurs when calling setGuestEmailRequired(true) in the IssueReporterActivity's onCreate() method. Omitting the method call prevents the error from occurring.

Everything was working fine on support v23.1.1, so it seems there was an internal change in TextInputEditText in the new version of the design support library?

Thanks again for your work, and please let me know if you need help with this. I believe the easiest fix would be to add an ID to the enclosing TextInputLayout for the air_inputEmail TextInputEditText and use findViewById() to access it instead of casting inputEmail.getParent().

janheinrichmerker commented 8 years ago

Good spot! I'll look into that ASAP