OK,现在Spinner可以使用了:
3. 接着我们来设置点击事件
spnLanguages.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { showMessage("Click Spinner"); }});
什么情况,运行后直接崩了?
FATAL EXCEPTION: mainProcess: com.sherlockshi.widget.sherlockspinner, PID: 11757java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sherlockshi.widget.sherlockspinner/com.sherlockshi.widget.MainActivity}: java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead ...Caused by: java.lang.RuntimeException: Don'