J'ai une application simple exemple WebView qui a la mise en page suivante:Comment définir le focus du clavier sur WebView?
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is /res/layout/main.xml -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<EditText android:id="@+id/urlToLoad"
android:hint="Type url to load"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<Button android:id="@+id/webviewgo"
android:text="Go"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="false" />
<com.example.exWebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</LinearLayout>
Il fonctionne comme prévu, mais je suis intéressé par routage d'un événement de clavier à la WebView. Actuellement, même si je sélectionne le WebView (et défile etc.), quand je tape n'importe quelle clé, il va au contrôle EditText ... ce qui n'est pas ce que je veux.
Comment est-ce que je fais un événement de clavier aller à la WebView à la place?