加入您的layout.xml
android:descendantFocusability="blocksDescendants"
希望按照主(父)佈局代碼它會工作。並設置以下屬性在你的WebView
android:focusable="false"
android:focusableInTouchMode="true"
See it:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:descendantFocusability="blocksDescendants"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivityFragment">
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="false"
android:focusableInTouchMode="false">
</WebView>
</RelativeLayout>
的可能的複製[安卓:退格鍵的WebView/BaseInputConnection](http://stackoverflow.com/questions/14560344/android-backspace-in-webview-baseinputconnection) – marcinj