Browse Source

optimize search view

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 4 years ago
parent
commit
43f034c778

+ 1 - 0
src/main/java/com/owncloud/android/utils/ThemeUtils.java

@@ -622,6 +622,7 @@ public final class ThemeUtils {
         // hacky as no default way is provided
         int fontColor = appBarPrimaryFontColor(context);
         SearchView.SearchAutoComplete editText = searchView.findViewById(R.id.search_src_text);
+        editText.setTextSize(16);
         setEditTextColor(context, editText, fontColor);
         editText.setHintTextColor(appBarSecondaryFontColor(context));
 

+ 33 - 13
src/main/res/layout/file_details_sharing_fragment.xml

@@ -16,22 +16,42 @@
   You should have received a copy of the GNU Affero General Public
   License along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
-<LinearLayout android:id="@+id/shareContainer"
-    android:layout_height="match_parent"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/shareContainer"
     android:layout_width="match_parent"
+    android:layout_height="match_parent"
     android:orientation="vertical"
-    android:paddingTop="@dimen/standard_eight_padding"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools">
-
-    <androidx.appcompat.widget.SearchView
-        style="@style/ownCloud.SearchView"
-        android:hint="@string/share_search"
-        android:id="@+id/searchView"
+    android:paddingTop="@dimen/standard_eight_padding">
+
+    <LinearLayout
+        android:id="@+id/search_container"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginEnd="@dimen/standard_margin"
-        android:layout_marginStart="@dimen/standard_quarter_margin"
-        android:layout_width="match_parent" />
+        android:paddingStart="@dimen/standard_padding"
+        android:paddingEnd="@dimen/zero">
+
+        <ImageView
+            android:id="@+id/searchViewIcon"
+            android:layout_height="@dimen/user_icon_size"
+            android:layout_width="@dimen/user_icon_size"
+            android:padding="@dimen/standard_half_padding"
+            android:contentDescription="@string/avatar"
+            android:layout_gravity="center_vertical"
+            android:src="@drawable/ic_search_grey" />
+
+        <androidx.appcompat.widget.SearchView
+            android:id="@+id/searchView"
+            style="@style/ownCloud.SearchView"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/zero"
+            android:layout_marginEnd="@dimen/standard_quarter_margin"
+            android:hint="@string/share_search"
+            app:searchIcon="@null" />
+
+    </LinearLayout>
 
     <LinearLayout
         android:id="@+id/shared_with_you_container"