]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/res/layout/find_on_page_app_bar.xml
Partial Find on Page implementation. Fix crash on SSLCertificateError for API <...
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / find_on_page_app_bar.xml
index 3cb0f995f187e1746a3d676ecd672aaaffb24218..56f0c1e76212abc27cc2d6dd3b32c1bc3bda1360 100644 (file)
   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" >
+
+    <!-- `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_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="actionGo"
+        android:inputType="text" />
 
     <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:id="@+id/find_previous"
+        android:src="@drawable/previous"
+        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" />
 
     <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:layout_width="35dp"
+        android:layout_height="35dp"
+        android:layout_marginStart="4dp"
+        android:layout_marginEnd="4dp"
+        android:layout_gravity="center_vertical"
         android:contentDescription="@string/next" />
 
     <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" />
-
-
-</RelativeLayout>
\ No newline at end of file
+        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