1 <android.support.v4.widget.SwipeRefreshLayout
2 android:id="@+id/swipeRefreshLayoutContainer"
3 xmlns:android="http://schemas.android.com/apk/res/android"
4 android:layout_width="match_parent"
5 android:layout_height="match_parent">
6 // SwipeRefreshLayout allows the user to swipe down to refresh.
9 android:id="@+id/relativeLayoutContainer"
10 xmlns:android="http://schemas.android.com/apk/res/android"
11 xmlns:tools="http://schemas.android.com/tools"
12 android:layout_width="match_parent"
13 android:layout_height="match_parent"
14 tools:context=".Webview" >
16 // FrameLayout lets the ProgressBar float on top of the LinearLayout.
18 android:id="@+id/addressBarFrameLayout"
19 android:layout_width="match_parent"
20 android:layout_height="wrap_content">
23 android:id="@+id/addressBarLinearLayout"
24 android:layout_width="match_parent"
25 android:layout_height="wrap_content"
26 android:orientation="horizontal">
28 // android:inputType="textUri" sets the keyboard to have a go arrow.
30 android:id="@+id/urlTextBox"
31 android:layout_width="0dp"
32 android:layout_height="wrap_content"
33 android:inputType="textUri"
34 android:imeOptions="actionGo"
35 android:layout_weight="1"/>
38 android:id="@+id/goButton"
39 android:text="@string/go_button"
40 android:onClick="loadUrlFromTextBox"
41 style="?android:attr/buttonStyleSmall"
42 android:layout_width="wrap_content"
43 android:layout_height="wrap_content" />
47 // android:max changes the maximum ProgressBar value from 10000 to 100 to match progress percentage.
49 android:id="@+id/progressBar"
50 style="?android:attr/progressBarStyleHorizontal"
51 android:layout_width="fill_parent"
52 android:layout_height="7dp"
53 android:layout_gravity="bottom"
55 android:progressTint="#FF0097FF"
56 android:progressBackgroundTint="#FFFFFFFF"
57 android:visibility="gone" />
62 android:id="@+id/mainWebView"
63 android:layout_width="match_parent"
64 android:layout_height="match_parent"
65 android:layout_below="@id/addressBarFrameLayout"
66 android:focusable="true"
67 android:focusableInTouchMode="true" />
71 </android.support.v4.widget.SwipeRefreshLayout>