Added code to control visibility in create activity