我尝试增加图片片段。增加按钮没问题。但是今天我想增加他们编译错误的列表。我该怎么做?。
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
View view = inflater.inflate(R.layout.templistmune, container, false);
String[] glossary = {"C","B","A","K"
};
setListAdapter(new ArrayAdapter<String>(templistview.this, R.layout.listview_item, glossary));
//The method setListAdapter(ArrayAdapter<String>) is undefined for the type templistview
//error The constructor ArrayAdapter<String>(templistview, int, String[]) is undefined
ListView listView = getListView();
//error The method getListView() is undefined for the type templistview
listView.setTextFilterEnabled(true);
listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
}
});
return view;
}