java - How to use Google Forms in Android -


i'm using webview call form google docs in android. when run on emulator , phone, checkboxes can't clicked. please help. hope can figure out. thank you.

here's activity class

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();      } } 

here's layout 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> 

use request focus able click inside webview.

webview.requestfocus(view.focus_down); 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo