contacts: Enable search without clicking on search icon

UI adjustements on Contacts drawer

Refs: #52438
diff --git a/res/drawable-hdpi/ic_action_important.png b/res/drawable-hdpi/ic_action_important.png
index 73f95d1..800dfc5 100644
--- a/res/drawable-hdpi/ic_action_important.png
+++ b/res/drawable-hdpi/ic_action_important.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_action_important.png b/res/drawable-mdpi/ic_action_important.png
index 5715e4b..f6bc448 100644
--- a/res/drawable-mdpi/ic_action_important.png
+++ b/res/drawable-mdpi/ic_action_important.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_action_important.png b/res/drawable-xhdpi/ic_action_important.png
index dea7f6c..b245857 100644
--- a/res/drawable-xhdpi/ic_action_important.png
+++ b/res/drawable-xhdpi/ic_action_important.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_action_important.png b/res/drawable-xxhdpi/ic_action_important.png
index e596f32..953dee0 100644
--- a/res/drawable-xxhdpi/ic_action_important.png
+++ b/res/drawable-xxhdpi/ic_action_important.png
Binary files differ
diff --git a/res/layout/frag_contact_list_header.xml b/res/layout/frag_contact_list_header.xml
index 20846a5..873e92c 100644
--- a/res/layout/frag_contact_list_header.xml
+++ b/res/layout/frag_contact_list_header.xml
@@ -1,39 +1,42 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/container"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:background="@color/sfl_dark_blue"
-    android:orientation="vertical" >
+              android:id="@+id/container"
+              android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:background="@color/sfl_dark_blue"
+              android:orientation="vertical">
 
     <SearchView
-        android:id="@+id/contact_search"
-        android:layout_width="match_parent"
-        android:layout_height="?android:attr/actionBarSize"
-        android:background="@color/lighter_gray" />
+            android:id="@+id/contact_search"
+            android:layout_width="match_parent"
+            android:queryHint="@string/searchbar_hint"
+            android:layout_height="?android:attr/actionBarSize"
+            android:background="@color/lighter_gray"/>
 
     <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:drawableLeft="@drawable/ic_action_important"
-        android:gravity="center_vertical"
-        android:text="@string/starred_contacts_title"
-        android:textColor="@color/white"
-        android:textStyle="bold" />
-
-    <LinearLayout
-        android:id="@+id/llMain"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content" >
-
-        <GridView
-            android:id="@+id/favorites_grid"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:columnWidth="80dp"
-            android:numColumns="auto_fit"
-            android:stretchMode="spacingWidth"
-            android:verticalSpacing="@dimen/contact_vertical_spacing" />
+            android:drawableLeft="@drawable/ic_action_important"
+            android:gravity="center_vertical"
+            android:text="@string/starred_contacts_title"
+            android:textColor="@color/white"
+            android:textStyle="bold"/>
+
+    <LinearLayout
+            android:id="@+id/llMain"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@color/sfl_blue_0"
+            android:padding="10dp">
+
+        <GridView
+                android:id="@+id/favorites_grid"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:columnWidth="80dp"
+                android:numColumns="auto_fit"
+                android:stretchMode="spacingWidth"
+                android:verticalSpacing="@dimen/contact_vertical_spacing"/>
     </LinearLayout>
 
 </LinearLayout>
\ No newline at end of file
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index ced7ead..e256208 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -88,6 +88,7 @@
     <!-- ContactList Fragment -->
     <string name="no_contact_found">Aucun contact trouvé</string>
     <string name="starred_contacts_title">Favoris</string>
+    <string name="searchbar_hint">Taper un nom ou un numéro&#8230;</string>
 
     <!-- TransferDFragment -->
     <string name="transfer_to_another_call">Transfert avec un autre appel</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 7ab6cbf..fc213ab 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -88,6 +88,7 @@
     <!-- ContactList Fragment -->
     <string name="no_contact_found">No contact found</string>
     <string name="starred_contacts_title">Favorites</string>
+    <string name="searchbar_hint">Enter name or phone number&#8230;</string>
 
     <!-- FileExplorerDFragement -->
     <string name="file_explorer_title">Select a file</string>
diff --git a/src/org/sflphone/fragments/ContactListFragment.java b/src/org/sflphone/fragments/ContactListFragment.java
index b7bd3a7..f2ebea1 100644
--- a/src/org/sflphone/fragments/ContactListFragment.java
+++ b/src/org/sflphone/fragments/ContactListFragment.java
@@ -225,11 +225,11 @@
 
             @Override
             public void onClick(View v) {
-                mQuickReturnSearchView.setOnQueryTextListener(ContactListFragment.this);
                 mQuickReturnSearchView.setIconified(false);
                 mQuickReturnSearchView.setFocusable(true);
             }
         });
+        mQuickReturnSearchView.setOnQueryTextListener(ContactListFragment.this);
 
         getLoaderManager().initLoader(LoaderConstants.CONTACT_LOADER, null, this);
 
@@ -384,7 +384,6 @@
         int rows = (listAdapter.getCount() + gridView.getNumColumns() - 1) / gridView.getNumColumns();
 
         for (int i = 0; i < rows; i++) {
-
             if (i == 0) {
                 View listItem = listAdapter.getView(i, null, gridView);
                 listItem.measure(desiredWidth, MeasureSpec.UNSPECIFIED);
@@ -395,7 +394,7 @@
 
         LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) llMain.getLayoutParams();
 
-        params.height = (int) (totalHeight + (getResources().getDimension(R.dimen.contact_vertical_spacing) * (rows - 1)));
+        params.height = (int) (totalHeight + (getResources().getDimension(R.dimen.contact_vertical_spacing) * (rows - 1) + llMain.getPaddingBottom() + llMain.getPaddingTop()));
         llMain.setLayoutParams(params);
         mHeader.requestLayout();
     }