added layout switch in main activity