您的位置:首页 > 移动开发

Android中实现Webview顶部带进度条的方法

2015-01-17 11:24 1296 查看

<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"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >
 
    <Button
        android:id="@+id/myButton"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Reload"
        />

    <ProgressBar
      style="?android:attr/progressBarStyleHorizontal"
        android:id="@+id/myProgressBar"
        android:layout_below="@id/myButton"
        android:layout_width="match_parent"
        android:layout_height="5px"
        />
  <WebView
      android:id="@+id/myWebView"
      android:layout_below="@id/myProgressBar"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      />
</RelativeLayout>

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息