The invention concerns an electronic device, method for assembling components of an electronic device and a flexible cap for facilitating assembly of an electronic component of an electronic device. The electronic device has a housing and at least one male connection portion for providing a detachable connection of the electronic device to a female snap, and where the male connection portion comprises an elongate stud. An end portion of said stud is adapted to receive a flexible cap of a conductive sheet material having a top surface to fit on the top of the stud and at least two side elements, The side elements are formed as legs joined to the top surface by a first bend of the sheet material and are aligned generally along the wall of the end portion of the stud. An electrical connection and a mechanical lock between the end portion and the printed circuit board is created by flexible deformation of the side members when sliding the cap and the end portion through an aperture in the printed circuit board.