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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java

Issue 2425763002: [NTP] Add functionality to ViewUtils to setEnabled recursively. (Closed)
Patch Set: Created 4 years, 2 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 | chrome/android/java/src/org/chromium/chrome/browser/preferences/ManagedPreferenceDelegate.java » ('j') | 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/ntp/NewTabPageView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
index 6471197cfb8e0369ecdbceaca3f6580ae4a740aa..2aa48dd80488fd03a9167136cffb42b358bfe0fd 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
@@ -92,7 +92,7 @@ public class NewTabPageView extends FrameLayout
private NewTabPageLayout mNewTabPageLayout;
private LogoView mSearchProviderLogoView;
- private ViewGroup mSearchBoxView;
+ private View mSearchBoxView;
private ImageView mVoiceSearchButton;
private MostVisitedLayout mMostVisitedLayout;
private View mMostVisitedPlaceholder;
@@ -372,7 +372,7 @@ public class NewTabPageView extends FrameLayout
mSearchProviderLogoView =
(LogoView) mNewTabPageLayout.findViewById(R.id.search_provider_logo);
- mSearchBoxView = (ViewGroup) mNewTabPageLayout.findViewById(R.id.search_box);
+ mSearchBoxView = mNewTabPageLayout.findViewById(R.id.search_box);
mNoSearchLogoSpacer = mNewTabPageLayout.findViewById(R.id.no_search_logo_spacer);
initializeSearchBoxTextView();
@@ -493,9 +493,7 @@ public class NewTabPageView extends FrameLayout
if (!mManager.isCurrentPage()) return;
// Disable the search box contents if it is the process of being animated away.
- for (int i = 0; i < mSearchBoxView.getChildCount(); i++) {
- mSearchBoxView.getChildAt(i).setEnabled(mSearchBoxView.getAlpha() == 1.0f);
- }
+ ViewUtils.setEnabledRecursive(mSearchBoxView, mSearchBoxView.getAlpha() == 1.0f);
if (mSearchBoxScrollListener != null) {
mSearchBoxScrollListener.onNtpScrollChanged(getToolbarTransitionPercentage());
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/preferences/ManagedPreferenceDelegate.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698