DineshG
unread,May 7, 2009, 11:49:18 AM5/7/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Auto-android
Also the pageDown and pageUp functions are not taking affest on the
screen.
I suspect I need to just refresh the screen somehow to let them take
affect . Is that so ?
Is there anything special needs to be done for letting these functions
take affect on the screen, and can I call them in a loop ?
This is what I am trying :
package com.android.mybrowser;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.*;
public class MyBrowser extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
super.onCreate(savedInstanceState);
WebView wView = (WebView)findViewById(R.id.wv1);
WebSettings wSet = wView.getSettings();
wSet.setJavaScriptEnabled(true);
wView.setWebViewClient(new myClient()) ;
wView.loadUrl("file:///android_asset/myWebPage.htm");
l
}
private class myClient extends WebViewClient {
public void onPageStarted(WebView view, String url,
android.graphics.Bitmap favicon) {
}
public void onPageFinished(WebView view, String url) {
view.zoomOut();
view.zoomIn();
view.pageDown(true);
view.pageUp(true);
finish();
}
}
}