Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java

Issue 621953002: Anchor ChromeShell's suggestion popup to the entire toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java
diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java
index 266e9d776be7cb28322256cc1a4e82c1e8ab2033..63e65b7bf8165e92eb2fe1ff8e176fd6b3426725 100644
--- a/chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java
+++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionPopup.java
@@ -49,8 +49,7 @@ public class SuggestionPopup implements OnSuggestionsReceivedListener, TextWatch
* Initializes a suggestion popup that will track urlField value and display suggestions based
* on that value.
*/
- public SuggestionPopup(Context context, EditText urlField,
- ChromeShellToolbar toolbar) {
+ public SuggestionPopup(Context context, EditText urlField, ChromeShellToolbar toolbar) {
mContext = context;
mUrlField = urlField;
mToolbar = toolbar;
@@ -138,13 +137,13 @@ public class SuggestionPopup implements OnSuggestionsReceivedListener, TextWatch
});
}
mSuggestionsPopup.setInputMethodMode(ListPopupWindow.INPUT_METHOD_NEEDED);
- mSuggestionsPopup.setWidth(mUrlField.getWidth());
+ mSuggestionsPopup.setWidth(mToolbar.getWidth());
mSuggestionArrayAdapter =
new SuggestionArrayAdapter(mContext, R.layout.dropdown_item, suggestions,
mUrlField);
mSuggestionsPopup.setHeight(getSuggestionPopupHeight());
mSuggestionsPopup.setAdapter(mSuggestionArrayAdapter);
- mSuggestionsPopup.setAnchorView(mUrlField);
+ mSuggestionsPopup.setAnchorView(mToolbar);
mSuggestionsPopup.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698