私はWebView
を使用してAndroidのGoogleドキュメントからフォームを呼び出しています。エミュレータと電話機で実行すると、CheckBox
のすべてをクリックすることはできません。助けてください。私はあなたがそれを理解できることを願っています。ありがとうございました。AndroidでGoogleフォームを使用する方法
は、ここに私の活動のクラス
package com.example.nevigrof.ymuc;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class SurveyForm extends Activity {
private class MyWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
WebView webview;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_survey_form);
webview = (WebView) findViewById(R.id.webview1);
webview.setWebViewClient(new MyWebViewClient());
openURL();
}
private void openURL() {
webview.loadUrl("thegoogleformiwanttobrowse");
webview.requestFocus();
}
}
ここに私のレイアウトのxmlだのです。
<?xml version="1.0" encoding="utf-8"?>
<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"
tools:context="com.example.nevigrof.ymuc.SurveyForm">
<WebView
android:id="@+id/webview1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
</RelativeLayout>
をまだクリックできない –
は、私はこのコードを配置する場所が、私はそれを理解していなかったあなたの先生に感謝、私は自分のコードに挿入したが、それは私にエラーを与える。 –
はまだ働いていません –