1

どうやら、ウェブページには編集ボックスやキーボードを必要とするものはありません。

これは、ユーザー インタラクション イベントでも機能しません。

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

    }

これは logcat からのログです。

http://pastebin.com/i5q0axk9

4

2 に答える 2

1

URLを開く方法が気になる場合は、これを試してみてください。これはテスト済みのコードです。

Uri uri = Uri.parse(URL);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent); 
于 2011-08-05T12:42:07.677 に答える
1

あなたの AndroidManifest.xml で

android:configChanges="orientation|keyboardHidden"を使用

例えば

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

私のために働いた、ホープもあなたを助けます。

于 2011-08-05T13:58:36.033 に答える