Well, android:configChanges="orientation"might look pretty convinient,
but it's tricky from the inside. My advice - don't use configChanges
property unless you REALLY know what you are doing (I wish Android
team had never exposed it publicly). As for your example, you'll just
have to store your WebView's state in onSaveInstanceSate and avoid
setting "configChanges" property. Look @ activity lifecycle
http://developer.android.com/intl/zh-TW/reference/android/app/Activity.html#ConfigurationChanges
for more information.

On Apr 14, 9:08 pm, nikhil <[email protected]> wrote:
> I figured that I can have custom layout for each orientation just by
> making two folders
> layout-port and layout-land. So I put different views in these
> folders. Worked well.
>
> Now, I have a webview in my activity and it reloads whenever there is
> any change in orientation. So to prevent that I put
> android:configChanges="orientation" in my manifest file.
>
> After putting this the reloading stopped but the contents in the
> layout-port started getting selected for landscape mode as well.
>
> Am not sure where I am going wrong. I need to have both.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to