that is interesting!  I can't say I've personally seen this issue.  You may 
want to make sure that the WebView container has the "focusable" attributes 
set to "true".
http://developer.android.com/reference/android/view/View.html#attr_android:focusable
 

Hope this helps!
-Matt
www.sep.com/mcterry

On Wednesday, March 21, 2012 5:07:51 AM UTC-4, riv wrote:
>
>
> I have a simple page [www/index.html]: 
>
>     <body> 
>         <div data-role="page" id="page1"> 
>             <div data-role="content"> 
>                 <a id="btnSave" data-role="button" data- 
> transition="fade" data-theme="b" href="#"> 
>                     Button 
>                 </a> 
>             </div> 
>         </div> 
>         <script> 
>             //App custom javascript 
>              $("#btnSave").click(function(​) { 
>                             ​console.log("called........"); 
>                         alert("btnSave is clicked"); 
>
>                              }); 
>         </script> 
>     </body> 
>
> This works fine as: 
>
> public class MyActivity extends DroidGap { 
>
>         /** Called when the activity is first created. */ 
>         @Override 
>         public void onCreate(Bundle savedInstanceState) { 
>                 super.​onCreate(savedInstanceState); 
>                   super.loadUrl(​"file:///android_asset/www/​index.html"); 
>
> but if I use Webview to render this page, onclick event never getting 
> called.. 
>
>                 mWebView = (WebView) findViewById(R.id.webview); 
>                 mWebView.​setWebViewClient(new MyWebViewClient()); 
>                 mWebView.​getSettings().​setJavaScriptEnabled(true); 
>                 mWebView.​getSettings().​setDomStorageEnabled(true); 
>                 mWebView.​getSettings().​setAllowFileAccess(true); 
>                 mWebView.​getSettings().​setBuiltInZoomControls(false); 
>                 mWebView.​loadUrl("file:///android_​asset/www/index.html"); 
>
>
> Is this a known issue ? 
>
> Thanks in advance, 
> riv

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to