如下:
//创建一个 YetAdapter
ListView listView = (ListView) view.findViewById(R.id.home_sent_listview); //此句和下一句位置不能颠倒,否则会报空指针错误! HomeSendListAdapter yetAdapter = new HomeSendListAdapter((ArrayList<VideoInfo>) list, getActivity()); listView.setAdapter(yetAdapter); listView.setOnItemClickListener(this);