2016-03-28 123 views
-1

我已經成功實現了一個進度條加載,當我的android網頁加載和頁面完成加載時關閉進度條。但我想顯示加載樣式作爲正常的進度條(不像普通的頁面加載旋轉的圓圈)。任何幫助非常感激,謝謝,進度條頁面加載android webview

我layout.xml文件

<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.vic.webviewtest2.MainActivityFragment" 
    tools:showIn="@layout/activity_main"> 

    <ProgressBar 
     android:id="@+id/progressBar" 
     style="?android:attr/progressBarStyle" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentTop="true" 
     android:layout_centerHorizontal="true" /> 

    <WebView xmlns:android="http://schemas.android.com/apk/res/android" 
     android:id="@+id/webview" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_below="@id/progressBar"> 
    </WebView> 

</RelativeLayout> 
+0

的可能的複製(http://stackoverflow.com/questions/2967337/how-do-i-use-android -progressbar功能於確定的模式) –

回答