handling layout activation