Android Layout land not working

Garmael picture Garmael · Mar 18, 2014 · Viewed 13.8k times · Source

I've been looking at issues in stackoverflow and I've tried everything I've seen but the layout-land not work. In my code I have and the method onConfigurationChanged

@Override
 public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);           
}

And the manifest file:

<activity
        android:name="com.sde.PlayerTrack"
        android:theme="@style/AppTheme"
        android:configChanges="orientation|keyboardHidden|screenSize"
        >
    </activity>

I tried also to remove in the android manifest entry: configChanges and then the layout land load but the components i have (TextView, scrollbar ...) does not work properly.

Can you help me, please?

Answer

Cheerag picture Cheerag · Mar 18, 2014

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