]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/activity_webview.xml
Add the favorite icon to the addressBarLinearLayout.
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / activity_webview.xml
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. -->
7
8     <RelativeLayout
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" >
15
16         <!-- FrameLayout lets the ProgressBar float on top of urlTextBox. -->
17         <FrameLayout
18             android:id="@+id/addressBarFrameLayout"
19             android:layout_width="match_parent"
20             android:layout_height="wrap_content">
21
22             <LinearLayout
23                 android:id="@+id/addressBarLinearLayout"
24                 android:layout_width="match_parent"
25                 android:layout_height="wrap_content"
26                 android:orientation="horizontal">
27
28                 <ImageView
29                     android:id="@+id/favoriteIcon"
30                     android:src="@drawable/ic_home_black_24dp"
31                     android:layout_width="wrap_content"
32                     android:layout_height="wrap_content"
33                     android:layout_gravity="center" />
34
35                 <!-- android:inputType="textUri" sets the keyboard to have a go arrow. -->
36                 <!-- android:layout_weight="1" makes urlTextBox take up all the remaining space. -->
37                 <EditText
38                     android:id="@+id/urlTextBox"
39                     android:layout_width="0dp"
40                     android:layout_weight="1"
41                     android:layout_height="wrap_content"
42                     android:inputType="textUri"
43                     android:imeOptions="actionGo" />
44             </LinearLayout>
45
46             <!-- android:max changes the maximum ProgressBar value from 10000 to 100 to match progress percentage. -->
47             <ProgressBar
48                 android:id="@+id/progressBar"
49                 style="?android:attr/progressBarStyleHorizontal"
50                 android:layout_width="fill_parent"
51                 android:layout_height="7dp"
52                 android:layout_gravity="bottom"
53                 android:max="100"
54                 android:progressTint="#FF0097FF"
55                 android:progressBackgroundTint="#FFFFFFFF"
56                 android:visibility="gone" />
57         </FrameLayout>
58
59         <WebView
60             android:id="@+id/mainWebView"
61             android:layout_width="match_parent"
62             android:layout_height="match_parent"
63             android:layout_below="@id/addressBarFrameLayout"
64             android:focusable="true"
65             android:focusableInTouchMode="true" />
66
67     </RelativeLayout>
68
69 </android.support.v4.widget.SwipeRefreshLayout>