For adhesive, the aerosol 3M stuff at Homedepot has done fine with me. They have one that specifically sayd for use on headliners. It ain't cheap and I end up using about half again their rated amount for coverage, but haven't had a headliner fall back off yet. Once you have the headliner panel out of the truck it's really not that hard. Just clean all the old foam off, lay the material out, fold back half of it, spray the panel and material, work it down from the center out to avoid wrinkles, do the same for the other half. Flip it over, trim the edges so about an inch overhangs the perimeter, notch you corner cuts, spray adhesive so it covers the inch of material and an inch of panel, let it get tacky and fold everything over to stick it down. Then the funnest part of all, getting the nice new panel back in without screwing it up.
When I did the custom interior in my '71 C10 I used weldwood contact cement. But was doing a lot of it, and have a gun that will spray it. It's not compatible with just any foam product though. That would concern me more than anything else, having a product not compatible and it eating the foam.
Tolerance is the virtue of a man without conviction.
The end of the world began the day it was created, and life is a sexually transmitted terminal disease.