listview中显示数据时老是报null,通过查询发现
cid_listview=(ListView) findViewById(R.id.listview_category);
返回null。
解决办法
View popupWindow=layoutInflator.inflate(R.layout.cid_popup, null);
cid_listview=(ListView) popupWindow.findViewById(R.id.listview_category);
所以在用
findViewById方法时要指定view