Commit 9ebb2342 authored by Finnur Thorarinsson's avatar Finnur Thorarinsson Committed by Commit Bot

Contacts Picker: Clamp width of dialog to a fixed max.

Bug: 988278, 860467
Change-Id: Ie77f86b054818f87d9d75531c5d8f160ba8e2fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1778499
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Auto-Submit: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694246}
parent aa366648
......@@ -13,7 +13,6 @@ import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.VisibleForTesting;
......@@ -30,6 +29,7 @@ import org.chromium.chrome.browser.widget.selection.SelectionDelegate;
import org.chromium.content.browser.contacts.ContactsPickerPropertiesRequested;
import org.chromium.ui.ContactsPickerListener;
import org.chromium.ui.UiUtils;
import org.chromium.ui.widget.OptimizedFrameLayout;
import java.util.ArrayList;
import java.util.Collections;
......@@ -41,7 +41,7 @@ import java.util.Set;
* A class for keeping track of common data associated with showing contact details in
* the contacts picker, for example the RecyclerView.
*/
public class PickerCategoryView extends RelativeLayout
public class PickerCategoryView extends OptimizedFrameLayout
implements View.OnClickListener, RecyclerView.RecyclerListener,
SelectionDelegate.SelectionObserver<ContactDetails>,
SelectableListToolbar.SearchDelegate, TopView.SelectAllToggleCallback {
......@@ -121,7 +121,7 @@ public class PickerCategoryView extends RelativeLayout
public PickerCategoryView(Context context, boolean multiSelectionAllowed,
boolean shouldIncludeNames, boolean shouldIncludeEmails, boolean shouldIncludeTel,
String formattedOrigin, ContactsPickerToolbar.ContactsToolbarDelegate delegate) {
super(context);
super(context, null);
mActivity = (ChromeActivity) context;
mMultiSelectionAllowed = multiSelectionAllowed;
......@@ -157,6 +157,7 @@ public class PickerCategoryView extends RelativeLayout
mToolbar.initializeSearchView(this, R.string.contacts_picker_search, 0);
mToolbar.setDelegate(delegate);
mToolbar.showBackArrow();
mSelectableListLayout.configureWideDisplayStyle();
mSearchButton = (ImageView) mToolbar.findViewById(R.id.search);
mSearchButton.setOnClickListener(this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment