]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/res/layout/find_on_page_app_bar.xml
Updates about_licenses, adding the full text of the Apache License 2.0 and the 3...
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / find_on_page_app_bar.xml
index 3cb0f995f187e1746a3d676ecd672aaaffb24218..30b5ae0a6830295b4fef3f0f11872d921b3fc2cf 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
   You should have received a copy of the GNU General Public License
   along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
 
-<RelativeLayout
+<!-- `LinearLayout` is initially `visibility="gone"` so the `url_app_bar` is visible. -->
+<LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/find_on_page_relativelayout"
+    android:id="@+id/find_on_page_linearlayout"
     android:layout_height="wrap_content"
-    android:layout_width="match_parent" >
+    android:layout_width="match_parent"
+    android:orientation="horizontal"
+    android:visibility="gone" >
 
-    <ImageView
-        android:id="@+id/close_find"
-        android:src="@drawable/close"
-        android:layout_alignParentEnd="true"
-        android:layout_width="30dp"
-        android:layout_height="30dp"
-        android:layout_centerVertical="true"
-        android:contentDescription="@string/close" />
+    <!-- `android:imeOptions="actionDone"` sets the keyboard to have a `check mark` key instead of a `new line` key. -->
+    <EditText
+        android:id="@+id/find_on_page_edittext"
+        android:layout_height="wrap_content"
+        android:layout_width="0dp"
+        android:layout_weight="1"
+        android:layout_marginStart="8dp"
+        android:layout_marginEnd="4dp"
+        android:hint="@string/find_on_page"
+        android:lines="1"
+        android:imeOptions="actionDone"
+        android:inputType="text" />
 
-    <ImageView
-        android:id="@+id/find_next"
-        android:src="@drawable/next"
-        android:layout_toStartOf="@id/close_find"
-        android:layout_width="30dp"
-        android:layout_height="30dp"
-        android:layout_centerVertical="true"
-        android:contentDescription="@string/next" />
+    <TextView
+        android:id="@+id/find_on_page_count_textview"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_marginStart="4dp"
+        android:layout_marginEnd="4dp"
+        android:text="@string/zero_of_zero"
+        />
 
     <ImageView
         android:id="@+id/find_previous"
         android:src="@drawable/previous"
-        android:layout_toStartOf="@id/find_next"
-        android:layout_width="30dp"
-        android:layout_height="30dp"
-        android:layout_centerVertical="true"
-        android:contentDescription="@string/previous" />
-
-    <!-- `android:imeOptions="actionGo"` sets the keyboard to have a `go` key instead of a `new line` key. -->
-    <EditText
-        android:id="@+id/find_on_page_edittext"
-        android:layout_toStartOf="@id/find_previous"
-        android:layout_height="wrap_content"
-        android:layout_width="match_parent"
-        android:hint="@string/find_on_page"
-        android:imeOptions="actionGo" />
+        android:layout_width="35dp"
+        android:layout_height="35dp"
+        android:layout_marginStart="4dp"
+        android:layout_marginEnd="4dp"
+        android:layout_gravity="center_vertical"
+        android:contentDescription="@string/previous"
+        android:onClick="findPreviousOnPage"/>
 
+    <ImageView
+        android:id="@+id/find_next"
+        android:src="@drawable/next"
+        android:layout_width="35dp"
+        android:layout_height="35dp"
+        android:layout_marginStart="4dp"
+        android:layout_marginEnd="4dp"
+        android:layout_gravity="center_vertical"
+        android:contentDescription="@string/next"
+        android:onClick="findNextOnPage"/>
 
-</RelativeLayout>
\ No newline at end of file
+    <ImageView
+        android:id="@+id/close_find"
+        android:src="@drawable/close"
+        android:layout_width="35dp"
+        android:layout_height="35dp"
+        android:layout_marginStart="4dp"
+        android:layout_marginEnd="8dp"
+        android:layout_gravity="center_vertical"
+        android:contentDescription="@string/close"
+        android:onClick="closeFindOnPage" />
+</LinearLayout>
\ No newline at end of file