1

I made a android app, weatherin[@installify.com] which have fullsize width-height web view, but whenever i change from portrait to landscape or vice-versa in android mobile , the webview reload the page, how i can prevent it from reloading again & again.. my apps for all[basic] android version , from 2.2 to top. thanx in advance

Rishi Kumar
  • 303
  • 1
  • 3
  • 9

2 Answers2

0
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setRetainInstance(true);

}
zapdroid
  • 562
  • 5
  • 16
0
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);            
        ...
        ...
        ...


        if (savedInstanceState != null) {
            mWebView.restoreState(savedInstanceState);
        } else {      
            mWebView.loadUrl();
        }
    }
Rahul
  • 381
  • 1
  • 5
  • 19