WebView scrollTo funktioniert nicht

Ich versuche, scrollTo Methode webview. Das meine layout-Datei für die webview.

<?xml version="1.0" encoding="utf-8"?>  
<LinearLayout  
  xmlns:android="http://schemas.android.com/apk/res/android"  
  android:orientation="vertical"  
  android:layout_width="fill_parent"  
  android:layout_height="fill_parent"   
>  
<WebView  
   android:id="@+id/webMap"  
   android:layout_width="fill_parent"  
   android:layout_height="fill_parent"  
 />  
</LinearLayout> 

Was ich versuche zu tun ist, zeigt eine html-Datei (die nur ein map-Bild) und scrollen bestimmten Bereich auf einem Bild mit :

mapWebView.loadUrl("file:///android_asset/maps/map.html");
mapWebView.scrollTo(300, 300);

Aber wenn die webview geladen wird, es zeigt immer an (0, 0) des Bildes.

Was ist das problem mit scrollTo() hier?

InformationsquelleAutor penguru | 2012-02-22
Schreibe einen Kommentar