optimize code struture of StampNewActivity.java