首页 新闻 会员 周边 捐助

popupwindow中autoCompleteaTextview失败

1
悬赏园豆:80 [已关闭问题] 关闭于 2012-08-12 16:08

 popupwindow中如何使用autoCompleteaTextview,报错unable add window

LayoutInflater mLayoutInflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);
              View popupview=mLayoutInflater.inflate(R.layout.popupwindow, null);
              mPopupWindow=new PopupWindow(popupview,LayoutParams.MATCH_PARENT,LayoutParams.FILL_PARENT);
              mPopupWindow.setFocusable(true);                
             String[] complans=new String[]{"wang","qing","wfds","afd"};
             ArrayAdapter<String>av= new ArrayAdapter<String>(getApplicationContext(),R.layout.auto,R.id.textView,complans);
              AutoCompleteTextView auto=(AutoCompleteTextView)popupview.findViewById(R.id.autoCompleteTextView1);
              auto.setAdapter(av);

              mPopupWindow.showAtLocation(bottom, Gravity.LEFT|Gravity.BOTTOM,0,0);   


在popupwindow中使用autocompletetextview 报错 unable add window

怎么解决啊,网上查了好多,都没解决啊

452615625的主页 452615625 | 初学一级 | 园豆:80
提问于:2012-08-10 01:11
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册