Yes I did that but after restoring the webview state it doesn't update
with new information.

On Apr 15, 2:31 am, Paul Turchenko <[email protected]> wrote:
> WebView has methods to save its state. Use them to store/obtain your
> webview's state.
>
> On Apr 15, 12:58 am, nikhil <[email protected]> wrote:
>
>
>
> > Paul,
>
> > The problem with onSaveInstanceSate is that it saves the state in
> > portrait layout and when I am in landscape layout it display the
> > correct state but after that it doesn't update with new information. I
> > want to save the state whenever theorientationchanges and then when
> > we are in neworientationthe webview should update with new info...
>
> > On Apr 14, 4:08 pm, Paul Turchenko <[email protected]> wrote:
>
> > > 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 
> > > lifecyclehttp://developer.android.com/intl/zh-TW/reference/android/app/Activit...
> > > for more information.
>
> > > On Apr 14, 9:08 pm, nikhil <[email protected]> wrote:
>
> > > > I figured that I can have custom layout for eachorientationjust 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 inorientation. 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