On Spinner OnSelect项目侦听器错误

时间:2013-11-27 14:15:56

标签: android android-spinner

我有一个名为drpcat的Spinner。我收到了错误 11-27 19:42:00.923:E / ViewRootImpl(21825):sendUserActionEvent()mView == null

这是我的代码

 drpcat.setOnItemSelectedListener(new OnItemSelectedListener(){

        @Override
        public void onItemSelected(AdapterView<?> arg0, View arg1,
                int arg2, long arg3) {

             if(isdefaultcatselection) 
             {                     
                    isdefaultcatselection = false;
             } 
             else 
             {
                 category=drpcat.getSelectedItem().toString();

                loadmake();     

             }


        }



        @Override
        public void onNothingSelected(AdapterView<?> arg0) {
            // TODO Auto-generated method stub

        }});

0 个答案:

没有答案