我不知道我的问题在哪里。
第一个XML:Android的webview:它不起作用
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
android:background="#000"
tools:context=".Reg">
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#FFFFFF"
android:padding="5dp"/>
<WebView
android:id="@+id/webView1"
android:layout_width="match_parent"
android:layout_height="66dp"
/>
</LinearLayout>
二:JAVA
WebView mwv;
mwv = (WebView) findViewById(R.id.webView1);
mwv.getSettings().setJavaScriptEnabled(true);
mwv.loadUrl("somepage");
页面打开不错,但我无法点击按钮或选择文本框...我只能做到这一点与标签在我的键盘。
任何想法?
感谢名单。很好的例子:)。我只需要这一行:'webview.getSettings()。setUseWideViewPort(true);' –