1.  Technical Field
This disclosure generally relates to electronic devices, and particularly, to an electronic device with a power switch. 
2.  Description of Related Art
Many electronic devices have a power switch for turning the electronic device on/off.  Such electronic devices include a housing defining a receiving hole, and the power switch is received in the receiving hole.  The power switch includes an operating button, a support member, a printed circuit board, and an elastic piece which is installed between the operating button and the printed circuit board.  When the operating button is pressed to contact the electrical contacts of the printed circuit board, the electronic device turns on.  When assembling the power switch in the housing, the operating button is inserted into the receiving hole, and the elastic piece is fixed to a surface of the operating button adjacent to the printed circuit board, and the support member is fixed to the housing, such that the elastic piece is located between the operating button and the printed circuit board and a space is reserved for allowing deformation of the elastic piece.  However, in the assembly process, a technician must manually align the operating button with the elastic piece, which is time consuming and often produces imprecise results. 
Therefore, there is room for improvement in the art.