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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/infobar/ContentWrapperView.java

Issue 396863003: [Android] Always show infobars at the bottom of the screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added back areInfoBarsOnTop to prevent downstream breakage Created 6 years, 5 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
Index: chrome/android/java/src/org/chromium/chrome/browser/infobar/ContentWrapperView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/ContentWrapperView.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/ContentWrapperView.java
index 56cb5230f4691f8221d93dd7b73eca26a41b46d8..216b35f10eba6822857222b9e5e6af23638456b3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/ContentWrapperView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/ContentWrapperView.java
@@ -35,7 +35,6 @@ public class ContentWrapperView extends FrameLayout {
private static final int CONTENT_INDEX = 0;
private final int mGravity;
- private final boolean mInfoBarsFromTop;
private final InfoBar mInfoBar;
private View mViewToHide;
@@ -45,13 +44,11 @@ public class ContentWrapperView extends FrameLayout {
* Constructs a ContentWrapperView object.
* @param context The context to create this View with.
*/
- public ContentWrapperView(Context context, InfoBar infoBar, View panel,
- boolean infoBarsFromTop) {
+ public ContentWrapperView(Context context, InfoBar infoBar, View panel) {
// Set up this ViewGroup.
super(context);
mInfoBar = infoBar;
- mGravity = infoBarsFromTop ? Gravity.BOTTOM : Gravity.TOP;
- mInfoBarsFromTop = infoBarsFromTop;
+ mGravity = Gravity.TOP;
// Set up this view.
Resources resources = context.getResources();
@@ -152,20 +149,6 @@ public class ContentWrapperView extends FrameLayout {
// We're transitioning between two views; set the alpha so it doesn't pop in.
if (mViewToHide != null) mViewToShow.setAlpha(0.0f);
-
- // Because of layout scheduling, we need to move the child Views downward before it
- // occurs. Failure to do so results in the Views being located incorrectly during the
- // first few frames of the animation.
- if (mInfoBarsFromTop && getViewToShowHeight() > getViewToHideHeight()) {
- getLayoutParams().height = getViewToShowHeight();
-
- int translation = getTransitionHeightDifference();
- for (int i = 0; i < getChildCount(); ++i) {
- View v = getChildAt(i);
- v.setTop(v.getTop() + translation);
- v.setBottom(v.getBottom() + translation);
- }
- }
}
}

Powered by Google App Engine
This is Rietveld 408576698