travijuu / NumberPicker

A simple customizable NumberPicker plugin for Android
MIT License
101 stars 27 forks source link

custom layout inflation error #11

Open Mani1124 opened 6 years ago

githeyj commented 5 years ago

Caused by: java.lang.ClassCastException: android.support.v7.widget.AppCompatTextView cannot be cast to android.widget.EditText Probably you this is the cause?

bluefirepatrick commented 5 years ago

I found that when using androidx I too got an inflation error on the custom layout when it tried to cast TextView to an EditText. I was able to fix the situation by replacing the TextView tag in the sample number_picker_custom_layout code with an EditText tag.

guenter47 commented 3 years ago

@traviju: Can you please include bluefirepatrick's solution in your readme. It saves a lot of searching and time!