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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java

Issue 2819743003: 🔍 Refactor LocationBarLayout to fix SearchActivity's location bar (Closed)
Patch Set: Rebase alone Created 3 years, 8 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 | « chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarTablet.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java
index 76487bacf535c51c1d5912d7b0e76e43217bf8dd..f1bdbb092dac21c0982dce7be1ea919cf3e20499 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java
@@ -28,17 +28,8 @@ public class SearchActivityLocationBarLayout extends LocationBarLayout {
private Delegate mDelegate;
public SearchActivityLocationBarLayout(Context context, AttributeSet attrs) {
- super(context, attrs);
+ super(context, attrs, R.layout.location_bar_base);
setUrlBarFocusable(true);
-
- // TODO(dfalcantara): Get rid of any possibility of inflating the G in a layout.
- View gContainer = findViewById(R.id.google_g_container);
- if (gContainer != null) gContainer.setVisibility(View.GONE);
-
- // TODO(dfalcantara): Find the correct way to do this.
- int spacingLarge =
- getResources().getDimensionPixelSize(R.dimen.contextual_search_peek_promo_padding);
- setPadding(spacingLarge, 0, spacingLarge, 0);
}
/** Set the {@link Delegate}. */
@@ -88,6 +79,13 @@ public class SearchActivityLocationBarLayout extends LocationBarLayout {
}
}
+ @Override
+ protected void updateButtonVisibility() {
+ super.updateButtonVisibility();
+ updateMicButtonVisibility(1.0f);
+ findViewById(R.id.url_action_container).setVisibility(View.VISIBLE);
+ }
+
private void focusTextBox() {
if (mNativeInitialized) onUrlFocusChange(true);
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarTablet.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698