1

顯然沒有編輯框或任何需要在網頁上的鍵盤。softkeyboard自動彈出第一次的web視圖加載

這個dos'nt工作甚至在用戶交互事件。

public void onUserInteraction() 
    { 
     super.onUserInteraction(); 
     InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); 
     imm.hideSoftInputFromWindow(webView.getWindowToken(), 0); 

    } 

這是logcat的日誌。

http://pastebin.com/i5q0axk9

+0

你能顯示代碼嗎? –

+0

http://pastebin.com/3x9QMTm8這隻發生在三星銀河設備 – user1338678

回答

1

如果您關注的是如何打開的URL,那麼你試試這個,這是測試代碼:

Uri uri = Uri.parse(URL); 
Intent intent = new Intent(Intent.ACTION_VIEW, uri); 
startActivity(intent); 
+0

這個問題不是打開webview或任何與之相關的東西,只是鍵盤彈出自動,我不想 – user1338678

1

在AndroidManifest.xml中

使用機器人:configChanges = 「orientation | keyboardHidden」

例如

<activity android:name=".YourActivity" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden"></activity> 

爲我工作,希望也可以幫助你。

+0

它的力量,我認爲三星正在做一些奇怪的事情,IME_ACTION_UNSPECIFIED AxT9SipMgr.setInputMode - from:1,to:1 – user1338678

相關問題