Note that there are some explanatory texts on larger screens.

plurals
  1. POWebview save password rotation issue
    text
    copied!<p>I have my <code>WebView</code> inside a <code>DialogFragment</code> showing a login page, after the user has introduced the username and password, is prompted to save his password, but if the user rotate the phone in that moment, the <code>WebView</code> will crash, the prompt will be hidden to the user, and thereby unable to reenter/rewrite data, being the <code>WebView</code> disabled in those functionality, and in this particular case where the <code>DialogFragment</code> survives the configuration changes, the user won't be able to submit the data, even if I change configuration again, and another problem, is that the internal OS doesn't recover anymore until I reconstruct everything, in example, I leave the <code>WebView</code> and when I recreate it the keyboard isn't showed up until the configuration changes again.</p> <p>The crash log is the following:</p> <pre><code>12-24 08:36:21.694: E/WindowManager(21235): Activity com.example.twitterlibraryservice.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@45aef418 that was originally added here 12-24 08:36:21.694: E/WindowManager(21235): android.view.WindowLeaked: Activity com.example.twitterlibraryservice.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@45aef418 that was originally added here 12-24 08:36:21.694: E/WindowManager(21235): at android.view.ViewRoot.&lt;init&gt;(ViewRoot.java:255) 12-24 08:36:21.694: E/WindowManager(21235): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148) 12-24 08:36:21.694: E/WindowManager(21235): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) 12-24 08:36:21.694: E/WindowManager(21235): at android.view.Window$LocalWindowManager.addView(Window.java:424) 12-24 08:36:21.694: E/WindowManager(21235): at android.app.Dialog.show(Dialog.java:241) 12-24 08:36:21.694: E/WindowManager(21235): at android.app.AlertDialog$Builder.show(AlertDialog.java:802) 12-24 08:36:21.694: E/WindowManager(21235): at android.webkit.WebView.onSavePassword(WebView.java:1065) 12-24 08:36:21.694: E/WindowManager(21235): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:431) 12-24 08:36:21.694: E/WindowManager(21235): at android.os.Handler.dispatchMessage(Handler.java:99) 12-24 08:36:21.694: E/WindowManager(21235): at android.os.Looper.loop(Looper.java:143) 12-24 08:36:21.694: E/WindowManager(21235): at android.app.ActivityThread.main(ActivityThread.java:4717) 12-24 08:36:21.694: E/WindowManager(21235): at java.lang.reflect.Method.invokeNative(Native Method) 12-24 08:36:21.694: E/WindowManager(21235): at java.lang.reflect.Method.invoke(Method.java:521) 12-24 08:36:21.694: E/WindowManager(21235): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 12-24 08:36:21.694: E/WindowManager(21235): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 12-24 08:36:21.694: E/WindowManager(21235): at dalvik.system.NativeStart.main(Native Method) </code></pre> <p>EDIT Corrected the <code>WebView</code> keyboard issue asking for the focus after it is created.</p> <pre><code>mWebView.requestFocus(); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload