This tutorial is only for devices running on android 6.0
Device must be rooted
And most importantly, Do at your own risk!
First download and install any root explorer (eg ES Files Explorer)
Launch the root file explorer and navigate to the system folder which is found inside the root folder of your device ie device/system directory
Inside the system folder, you will find build.prop file. Open it with any text editor app. (ES Explorer has build in text editor)
Grant Super User access if it appears
Copy and add the text below at the end of the build.prop file
save and exit the text editor.
If done correctly, when you open recent app menu, you will see a new square icon near close [X]. Tap this icon and you will be presented with options to select new layout of the task you want to execute. The layout can either be landscape or portrait.
Remember to show off with this new feature on your device LOL.............