You just use this code only in Activity So you are using the Drawer Layout in your Main activity I think So you set this code in your MainActivity that will work definitely....
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
You just put this code .where you created the drawer layout activity...