If you're attaching it to your activity, use that. If, however, you want a floating view, make your call as follows:
View view = inflater.inflate(resourceId, null, false);
This will create it and allow you to add it as a view to whatever you please.