]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/activity_webview.xml
Move the progress bar from the top of the WebView to the bottom of the address bar.
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / activity_webview.xml
1 <RelativeLayout
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" >
7
8     // FrameLayout lets the ProgressBar float on top of the LinearLayout.
9     <FrameLayout
10         android:layout_width="match_parent"
11         android:layout_height="wrap_content"
12         android:id="@+id/topFrameLayout">
13
14         <LinearLayout
15             android:layout_width="match_parent"
16             android:layout_height="wrap_content"
17             android:orientation="horizontal"
18             android:id="@+id/topBarLayout">
19
20             // android:inputType="textUri" sets the keyboard to have a go arrow.
21             <EditText
22                 android:id="@+id/urlTextBox"
23                 android:layout_width="0dp"
24                 android:layout_height="wrap_content"
25                 android:inputType="textUri"
26                 android:imeOptions="actionGo"
27                 android:layout_weight="1"/>
28
29             <Button
30                 android:id="@+id/goButton"
31                 android:text="@string/go_button"
32                 android:onClick="loadUrlFromTextBox"
33                 style="?android:attr/buttonStyleSmall"
34                 android:layout_width="wrap_content"
35                 android:layout_height="wrap_content" />
36             </LinearLayout>
37
38         // android:max changes the maximum ProgressBar value from 10000 to 100 to match progress percentage.
39         <ProgressBar
40             android:id="@+id/progressBar"
41             style="?android:attr/progressBarStyleHorizontal"
42             android:layout_width="fill_parent"
43             android:layout_height="7dp"
44             android:layout_gravity="bottom"
45             android:max="100"
46             android:progressTint="#FF29A8FF"
47             android:progressBackgroundTint="#FFFFFFFF"
48             android:visibility="gone" />
49     </FrameLayout>
50
51     <WebView
52         android:id="@+id/mainWebView"
53         android:layout_width="match_parent"
54         android:layout_height="fill_parent"
55         android:layout_below="@id/topFrameLayout"
56         android:focusable="true"
57         android:focusableInTouchMode="true" />
58 </RelativeLayout>