OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser; | 5 package org.chromium.chrome.browser; |
6 | 6 |
7 import android.animation.Animator; | 7 import android.animation.Animator; |
8 import android.animation.AnimatorListenerAdapter; | 8 import android.animation.AnimatorListenerAdapter; |
9 import android.animation.ObjectAnimator; | 9 import android.animation.ObjectAnimator; |
10 import android.animation.ValueAnimator; | 10 import android.animation.ValueAnimator; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 * @param actionBarDelegate The delegate for communicating with the action b
ar while animating | 80 * @param actionBarDelegate The delegate for communicating with the action b
ar while animating |
81 * it. | 81 * it. |
82 */ | 82 */ |
83 public ContextualMenuBar(Context context, ActionBarDelegate actionBarDelegat
e) { | 83 public ContextualMenuBar(Context context, ActionBarDelegate actionBarDelegat
e) { |
84 mActionBarDelegate = actionBarDelegate; | 84 mActionBarDelegate = actionBarDelegate; |
85 mContext = context; | 85 mContext = context; |
86 mTabStripHeight = mContext.getResources().getDimension(R.dimen.tab_strip
_height); | 86 mTabStripHeight = mContext.getResources().getDimension(R.dimen.tab_strip
_height); |
87 } | 87 } |
88 | 88 |
89 /** | 89 /** |
| 90 * Overrides the preset height of the tab strip. |
| 91 */ |
| 92 public void setTabStripHeight(int tabStripHeight) { |
| 93 mTabStripHeight = tabStripHeight; |
| 94 } |
| 95 |
| 96 /** |
90 * @return The delegate handling action bar positioning for the contextual m
enu bar. | 97 * @return The delegate handling action bar positioning for the contextual m
enu bar. |
91 */ | 98 */ |
92 public ActionBarDelegate getActionBarDelegate() { | 99 public ActionBarDelegate getActionBarDelegate() { |
93 return mActionBarDelegate; | 100 return mActionBarDelegate; |
94 } | 101 } |
95 | 102 |
96 /** | 103 /** |
97 * Sets the custom ActionMode.Callback | 104 * Sets the custom ActionMode.Callback |
98 * @param customSelectionActionModeCallback | 105 * @param customSelectionActionModeCallback |
99 */ | 106 */ |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 public void onAnimationEnd(Animator animation) { | 188 public void onAnimationEnd(Animator animation) { |
182 mCurrentAnimation = null; | 189 mCurrentAnimation = null; |
183 mActionBarDelegate.setActionBarBackgroundVisibility(false); | 190 mActionBarDelegate.setActionBarBackgroundVisibility(false); |
184 } | 191 } |
185 }); | 192 }); |
186 | 193 |
187 mCurrentAnimation.start(); | 194 mCurrentAnimation.start(); |
188 mShowingContextualActionBar = false; | 195 mShowingContextualActionBar = false; |
189 } | 196 } |
190 } | 197 } |
OLD | NEW |