MultiSelectSpinner icon indicating copy to clipboard operation
MultiSelectSpinner copied to clipboard

canot cast to class MultiSelectSpinner

Open cliu903 opened this issue 12 years ago • 1 comments

MultiSelectSpinner mySpin = (MultiSelectSpinner)findViewById(R.id.spinner1);

Caused by: java.lang.ClassCastException: android.widget.Spinner cannot be cast to com.example.testspinner.MultiSelectSpinner

why?

cliu903 avatar Feb 16 '13 12:02 cliu903

I was having the same problem and looking all over to find the answer. What I ended up needing to do is go to my layout.xml file where it would normally say <Spinner ... ... > and replace the <Spinner with <com.sample.app.MultiSelectSpinner. I had the included Java file on here in that Java directory. If it's in a lower package directory it'd become something like <com.sample.app.folder1.MultiSelectSpinner etc...

JourdanDixon avatar Jun 25 '15 07:06 JourdanDixon