94. }
95. }).start();
96. }
97. HandlermyMessageHandler=newHandler(){
98. @Override
99. publicvoidhandleMessage(Messagemsg){
100. switch(msg.what){
101. caseMainActivity.PROGRESSBARSIZE:
102. mWebView.loadUrl("javascript:showcount()");
103. break;
104. default:
105. break;
106. }
107. super.handleMessage(msg);
108. }
109. };
110. }
4. main.xml
[xhtml] view plaincopyprint?
1. <?xmlversion="1.0"encoding="utf-8"?>
2. <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
3. android:orientation="vertical"android:layout_width="fill_parent"
4. android:layout_height="fill_parent">
5. <WebViewandroid:id="@+id/webView01"android:layout_widt
h="wrap_content"
6. android:layout_height="wrap_content"/>
7.
8. <ProgressBarandroid:id="@+id/progress_horizontal"
9. style="?android:attr/progressBarStyleHorizontal"android:layout_widt
h="fill_parent"
10. android:layout_height="wrap_content"android:max="100"
11. android:progress="0"android:secondaryProgress="0"/>