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
怎么解决啊,网上查了好多,都没解决啊