If your Xbox 360 wireless gamepad got randomly turn off by itself or loosing connection, this guide will tell you how to fix it.
if this not fix your gamepad, try this guide
1. remove the battery compartment from the gamepad.
2. cut some thick doubletape. about the same size as the metal thing.
3. stick it to the metal thing.
just like this picture
click image to enlarge
as an alternative,
you can use cardboard paper, Styrofoam, plastic or any thick thing to be placed on that metal thing.