2 xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:tools="http://schemas.android.com/tools"
4 android:layout_width="match_parent"
5 android:layout_height="match_parent"
6 tools:context=".Webview" >
9 android:layout_width="match_parent"
10 android:layout_height="wrap_content"
11 android:orientation="horizontal"
12 android:id="@+id/topBarLayout">
14 // android:inputType="textUri" sets the keyboard to have a go arrow.
16 android:id="@+id/urlTextBox"
17 android:layout_width="0dp"
18 android:layout_height="wrap_content"
19 android:inputType="textUri"
20 android:imeOptions="actionGo"
21 android:layout_weight="1"/>
24 android:id="@+id/goButton"
25 android:text="@string/go_button"
26 android:onClick="loadUrlFromTextBox"
27 style="?android:attr/buttonStyleSmall"
28 android:layout_width="wrap_content"
29 android:layout_height="wrap_content" />
32 // FrameLayout lets the ProgressBar float on top of the WebView.
34 android:layout_width="match_parent"
35 android:layout_height="match_parent"
36 android:layout_below="@+id/topBarLayout"
37 tools:context=".MainActivity"
38 android:id="@+id/relativeLayout">
41 android:id="@+id/mainWebView"
42 android:layout_width="match_parent"
43 android:layout_height="match_parent"
44 android:focusable="true"
45 android:focusableInTouchMode="true" />
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"
54 android:progressTint="#FF29A8FF"
55 android:progressBackgroundTint="#FFFFFFFF"
56 android:visibility="gone" />