Added a new method for autolayout

Change-Id: I67cd336f16af63acbcb7dbd8e4510ec90307d1df