Getting Error in BaseAdapter Android
I have created a class that extends BaseAdapter.I don't have any
custom.xml to inflate it . Simple i have written this code
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = getLayoutInflater();//Getting Error here
to create a method getLayoutInflater
View row;
row = inflater.inflate(android.R.layout.simple_list_item_1,
parent, false);
TextView title;
title = (TextView) row.findViewById(android.R.id.text1);
title.setText(Title[position]);
return (row);
}
On getLayoutInflater() it is showing me the error to create a method.If i
am creating this class in the main activity then it is working properly.So
what i have to do remove this error
No comments:
Post a Comment