Android Layout land not working

Remove orientation from the android:configChanges in your manifest file, and put you landscape layout xml file into layout-land folder.


Finally, my solution is:

AndroidManifest.xml File:

<activity
        android:name="activity.name"
        android:configChanges="orientation|keyboardHidden|screenSize"       
        >

And in the activity implement the method onConfigurationChanged (Configuration newconfig):

@Override
 public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);     
        if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
            createHorizontalalLayout();            
        } else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){
            createVerticalLayout();             
        }
}

With createVerticalLayout () and createHorizontalLayout () programmatically do the layouts.