]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blob - app/src/main/res/layout/app_bar.xml
Move favoriteIcon, urlTextBox, and progressBar to a custom view in the app bar.
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / app_bar.xml
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!-- FrameLayout lets the ProgressBar float on top of urlTextBox. -->
4 <FrameLayout
5     android:id="@+id/addressBarFrameLayout"
6     xmlns:android="http://schemas.android.com/apk/res/android"
7     android:layout_width="match_parent"
8     android:layout_height="wrap_content">
9
10     <LinearLayout
11         android:id="@+id/addressBarLinearLayout"
12         android:layout_width="match_parent"
13         android:layout_height="wrap_content"
14         android:orientation="horizontal">
15
16         <ImageView
17             android:id="@+id/favoriteIcon"
18             android:src="@drawable/ic_language_black_24dp"
19             android:layout_width="wrap_content"
20             android:layout_height="wrap_content"
21             android:layout_gravity="center"
22             android:contentDescription="@string/favorite_icon"/>
23
24         <!-- android:inputType="textUri" sets the keyboard to have a go arrow. -->
25         <!-- android:layout_weight="1" makes urlTextBox take up all the remaining space. -->
26         <EditText
27             android:id="@+id/urlTextBox"
28             android:layout_width="0dp"
29             android:layout_weight="1"
30             android:layout_height="wrap_content"
31             android:inputType="textUri"
32             android:imeOptions="actionGo" />
33     </LinearLayout>
34
35     <!-- android:max changes the maximum ProgressBar value from 10000 to 100 to match progress percentage. -->
36     <ProgressBar
37         android:id="@+id/progressBar"
38         style="?android:attr/progressBarStyleHorizontal"
39         android:layout_width="fill_parent"
40         android:layout_height="7dp"
41         android:layout_gravity="bottom"
42         android:max="100"
43         android:progressTint="#FF0097FF"
44         android:progressBackgroundTint="#FFFFFFFF"
45         android:visibility="gone" />
46 </FrameLayout>