taraloca
taraloca

Reputation: 9135

Orientation Change not Grabbing Correct layout

I have two layout files, one for landscape (layout-land) and one for portrait (layout-port). When I run my application the correct layout is grabbed initially dependent upon how I am holding my phone. If I am holding landscape, landscape is grabbed and visa versa. BUT, once I initially launch my application, if I change orientation the first layout grabbed at launch is used when switching orientation.

How do I get Android to changed layout xml per orientation change after initial launch of applicaiton?

In my manifest I have android:configChanges="orientation/keyboardHidden"

Upvotes: 1

Views: 726

Answers (1)

Dahlgren
Dahlgren

Reputation: 781

When you specify configChanges in the manifest for an activity, the activity has to handle the events by itself. Either do the required layout change in the activity or remove the configChanges in the manifest.

http://developer.android.com/guide/topics/manifest/activity-element.html#config

Upvotes: 2

Related Questions