TJ1
TJ1

Reputation: 8468

Android: getLayoutInflater() problem

I have the following lines in my code:

View convertView;
convertView = getLayoutInflater().inflate(R.layout.classheader, parent, false);

And I have a "classheader.xml" in the layout folder.

However; I get this error: "classheader cannot be resolved or is not a field".

Can anybody please help me to find out what is the reason for this error?

Thanks

Upvotes: 0

Views: 3047

Answers (1)

Vinoth
Vinoth

Reputation: 5785

Are you including com.android.R by mistake in your import declaration.

Upvotes: 2

Related Questions