Skip to content
Snippets Groups Projects
Commit 33936efb authored by Alexandre Lision's avatar Alexandre Lision
Browse files

contacts: Enable search without clicking on search icon

UI adjustements on Contacts drawer

Refs: #52438
parent 5bce9b8c
No related branches found
No related tags found
No related merge requests found
res/drawable-hdpi/ic_action_important.png

669 B | W: | H:

res/drawable-hdpi/ic_action_important.png

604 B | W: | H:

res/drawable-hdpi/ic_action_important.png
res/drawable-hdpi/ic_action_important.png
res/drawable-hdpi/ic_action_important.png
res/drawable-hdpi/ic_action_important.png
  • 2-up
  • Swipe
  • Onion skin
res/drawable-mdpi/ic_action_important.png

485 B | W: | H:

res/drawable-mdpi/ic_action_important.png

451 B | W: | H:

res/drawable-mdpi/ic_action_important.png
res/drawable-mdpi/ic_action_important.png
res/drawable-mdpi/ic_action_important.png
res/drawable-mdpi/ic_action_important.png
  • 2-up
  • Swipe
  • Onion skin
res/drawable-xhdpi/ic_action_important.png

823 B | W: | H:

res/drawable-xhdpi/ic_action_important.png

765 B | W: | H:

res/drawable-xhdpi/ic_action_important.png
res/drawable-xhdpi/ic_action_important.png
res/drawable-xhdpi/ic_action_important.png
res/drawable-xhdpi/ic_action_important.png
  • 2-up
  • Swipe
  • Onion skin
res/drawable-xxhdpi/ic_action_important.png

1.04 KiB | W: | H:

res/drawable-xxhdpi/ic_action_important.png

1.08 KiB | W: | H:

res/drawable-xxhdpi/ic_action_important.png
res/drawable-xxhdpi/ic_action_important.png
res/drawable-xxhdpi/ic_action_important.png
res/drawable-xxhdpi/ic_action_important.png
  • 2-up
  • Swipe
  • Onion skin
<?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" />
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:id="@+id/llMain"
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: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
......@@ -88,6 +88,7 @@ as that of the covered work.
<!-- 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>
......
......@@ -88,6 +88,7 @@ as that of the covered work.
<!-- 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>
......
......@@ -225,11 +225,11 @@ public class ContactListFragment extends Fragment implements OnQueryTextListener
@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 @@ public class ContactListFragment extends Fragment implements OnQueryTextListener
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 @@ public class ContactListFragment extends Fragment implements OnQueryTextListener
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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment