Added a method to do custom layer switch.

Signed-off-by: Emerson MX <emersonmx@gmail.com>