Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Daniel Sandler | 325dc23 | 2013-06-05 22:57:57 -0400 | [diff] [blame] | 17 | package com.android.launcher3; |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 18 | |
Winson Chung | 201bc82 | 2011-06-20 15:41:53 -0700 | [diff] [blame] | 19 | import android.animation.Animator; |
| 20 | import android.animation.AnimatorListenerAdapter; |
| 21 | import android.animation.ObjectAnimator; |
Adam Cohen | c2d6e89 | 2014-10-16 09:49:24 -0700 | [diff] [blame] | 22 | import android.animation.ValueAnimator; |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 23 | import android.content.Context; |
Mathew Inwood | cf7f63b | 2011-10-13 11:31:38 +0100 | [diff] [blame] | 24 | import android.graphics.Rect; |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 25 | import android.util.AttributeSet; |
| 26 | import android.view.View; |
Winson Chung | a62e9fd | 2011-07-11 15:20:48 -0700 | [diff] [blame] | 27 | import android.view.animation.AccelerateInterpolator; |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 28 | import android.widget.FrameLayout; |
| 29 | |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 30 | /* |
| 31 | * Ths bar will manage the transition between the QSB search bar and the delete drop |
| 32 | * targets so that each of the individual IconDropTargets don't have to. |
| 33 | */ |
| 34 | public class SearchDropTargetBar extends FrameLayout implements DragController.DragListener { |
| 35 | |
Winson Chung | a62e9fd | 2011-07-11 15:20:48 -0700 | [diff] [blame] | 36 | private static final int sTransitionInDuration = 200; |
| 37 | private static final int sTransitionOutDuration = 175; |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 38 | |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 39 | private ObjectAnimator mDropTargetBarAnim; |
Adam Cohen | c2d6e89 | 2014-10-16 09:49:24 -0700 | [diff] [blame] | 40 | private ValueAnimator mQSBSearchBarAnim; |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 41 | private static final AccelerateInterpolator sAccelerateInterpolator = |
| 42 | new AccelerateInterpolator(); |
Winson Chung | 201bc82 | 2011-06-20 15:41:53 -0700 | [diff] [blame] | 43 | |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 44 | private boolean mIsSearchBarHidden; |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 45 | private View mQSBSearchBar; |
| 46 | private View mDropTargetBar; |
Winson Chung | a62e9fd | 2011-07-11 15:20:48 -0700 | [diff] [blame] | 47 | private int mBarHeight; |
Adam Cohen | d4d7aa5 | 2011-07-19 21:47:37 -0700 | [diff] [blame] | 48 | private boolean mDeferOnDragEnd = false; |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 49 | |
Sunny Goyal | fa401a1 | 2015-04-10 13:45:42 -0700 | [diff] [blame] | 50 | // Drop targets |
| 51 | private ButtonDropTarget mInfoDropTarget; |
| 52 | private ButtonDropTarget mDeleteDropTarget; |
| 53 | private ButtonDropTarget mUninstallDropTarget; |
| 54 | |
Michael Jurka | 19e3347 | 2012-05-14 20:41:52 -0700 | [diff] [blame] | 55 | private boolean mEnableDropDownDropTargets; |
Winson Chung | c51db6a | 2011-10-05 11:44:49 -0700 | [diff] [blame] | 56 | |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 57 | public SearchDropTargetBar(Context context, AttributeSet attrs) { |
| 58 | this(context, attrs, 0); |
| 59 | } |
| 60 | |
| 61 | public SearchDropTargetBar(Context context, AttributeSet attrs, int defStyle) { |
| 62 | super(context, attrs, defStyle); |
| 63 | } |
| 64 | |
| 65 | public void setup(Launcher launcher, DragController dragController) { |
| 66 | dragController.addDragListener(this); |
Sunny Goyal | fa401a1 | 2015-04-10 13:45:42 -0700 | [diff] [blame] | 67 | dragController.setFlingToDeleteDropTarget(mDeleteDropTarget); |
| 68 | |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 69 | dragController.addDragListener(mInfoDropTarget); |
| 70 | dragController.addDragListener(mDeleteDropTarget); |
Sunny Goyal | fa401a1 | 2015-04-10 13:45:42 -0700 | [diff] [blame] | 71 | dragController.addDragListener(mUninstallDropTarget); |
| 72 | |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 73 | dragController.addDropTarget(mInfoDropTarget); |
| 74 | dragController.addDropTarget(mDeleteDropTarget); |
Sunny Goyal | fa401a1 | 2015-04-10 13:45:42 -0700 | [diff] [blame] | 75 | dragController.addDropTarget(mUninstallDropTarget); |
| 76 | |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 77 | mInfoDropTarget.setLauncher(launcher); |
| 78 | mDeleteDropTarget.setLauncher(launcher); |
Sunny Goyal | fa401a1 | 2015-04-10 13:45:42 -0700 | [diff] [blame] | 79 | mUninstallDropTarget.setLauncher(launcher); |
Sunny Goyal | 594d76d | 2014-11-06 10:12:54 -0800 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | public void setQsbSearchBar(View qsb) { |
| 83 | mQSBSearchBar = qsb; |
Adam Cohen | c2d6e89 | 2014-10-16 09:49:24 -0700 | [diff] [blame] | 84 | if (mQSBSearchBar != null) { |
| 85 | if (mEnableDropDownDropTargets) { |
| 86 | mQSBSearchBarAnim = LauncherAnimUtils.ofFloat(mQSBSearchBar, "translationY", 0, |
| 87 | -mBarHeight); |
| 88 | } else { |
| 89 | mQSBSearchBarAnim = LauncherAnimUtils.ofFloat(mQSBSearchBar, "alpha", 1f, 0f); |
| 90 | } |
| 91 | setupAnimation(mQSBSearchBarAnim, mQSBSearchBar); |
Cristina Stancu | 476493b | 2013-08-07 17:20:14 +0100 | [diff] [blame] | 92 | } else { |
Adam Cohen | c2d6e89 | 2014-10-16 09:49:24 -0700 | [diff] [blame] | 93 | // Create a no-op animation of the search bar is null |
| 94 | mQSBSearchBarAnim = ValueAnimator.ofFloat(0, 0); |
| 95 | mQSBSearchBarAnim.setDuration(sTransitionInDuration); |
Cristina Stancu | 476493b | 2013-08-07 17:20:14 +0100 | [diff] [blame] | 96 | } |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 97 | } |
| 98 | |
Winson Chung | c7d2b60 | 2012-05-16 17:02:20 -0700 | [diff] [blame] | 99 | private void prepareStartAnimation(View v) { |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 100 | // Enable the hw layers before the animation starts (will be disabled in the onAnimationEnd |
| 101 | // callback below) |
Adam Cohen | c2d6e89 | 2014-10-16 09:49:24 -0700 | [diff] [blame] | 102 | if (v != null) { |
| 103 | v.setLayerType(View.LAYER_TYPE_HARDWARE, null); |
| 104 | } |
Winson Chung | c7d2b60 | 2012-05-16 17:02:20 -0700 | [diff] [blame] | 105 | } |
| 106 | |
Adam Cohen | c2d6e89 | 2014-10-16 09:49:24 -0700 | [diff] [blame] | 107 | private void setupAnimation(ValueAnimator anim, final View v) { |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 108 | anim.setInterpolator(sAccelerateInterpolator); |
| 109 | anim.setDuration(sTransitionInDuration); |
| 110 | anim.addListener(new AnimatorListenerAdapter() { |
Winson Chung | 315b3ba | 2012-05-11 10:51:32 -0700 | [diff] [blame] | 111 | @Override |
| 112 | public void onAnimationEnd(Animator animation) { |
Adam Cohen | c2d6e89 | 2014-10-16 09:49:24 -0700 | [diff] [blame] | 113 | if (v != null) { |
| 114 | v.setLayerType(View.LAYER_TYPE_NONE, null); |
| 115 | } |
Winson Chung | 315b3ba | 2012-05-11 10:51:32 -0700 | [diff] [blame] | 116 | } |
| 117 | }); |
| 118 | } |
| 119 | |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 120 | @Override |
| 121 | protected void onFinishInflate() { |
| 122 | super.onFinishInflate(); |
| 123 | |
| 124 | // Get the individual components |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 125 | mDropTargetBar = findViewById(R.id.drag_target_bar); |
Winson Chung | a6427b1 | 2011-07-27 10:53:39 -0700 | [diff] [blame] | 126 | mInfoDropTarget = (ButtonDropTarget) mDropTargetBar.findViewById(R.id.info_target_text); |
| 127 | mDeleteDropTarget = (ButtonDropTarget) mDropTargetBar.findViewById(R.id.delete_target_text); |
Sunny Goyal | fa401a1 | 2015-04-10 13:45:42 -0700 | [diff] [blame] | 128 | mUninstallDropTarget = (ButtonDropTarget) mDropTargetBar.findViewById(R.id.uninstall_target_text); |
Winson Chung | a62e9fd | 2011-07-11 15:20:48 -0700 | [diff] [blame] | 129 | |
Adam Cohen | d4d7aa5 | 2011-07-19 21:47:37 -0700 | [diff] [blame] | 130 | mInfoDropTarget.setSearchDropTargetBar(this); |
| 131 | mDeleteDropTarget.setSearchDropTargetBar(this); |
Sunny Goyal | fa401a1 | 2015-04-10 13:45:42 -0700 | [diff] [blame] | 132 | mUninstallDropTarget.setSearchDropTargetBar(this); |
Adam Cohen | d4d7aa5 | 2011-07-19 21:47:37 -0700 | [diff] [blame] | 133 | |
Michael Jurka | 19e3347 | 2012-05-14 20:41:52 -0700 | [diff] [blame] | 134 | mEnableDropDownDropTargets = |
Winson Chung | a62e9fd | 2011-07-11 15:20:48 -0700 | [diff] [blame] | 135 | getResources().getBoolean(R.bool.config_useDropTargetDownTransition); |
Winson Chung | 201bc82 | 2011-06-20 15:41:53 -0700 | [diff] [blame] | 136 | |
| 137 | // Create the various fade animations |
Michael Jurka | 19e3347 | 2012-05-14 20:41:52 -0700 | [diff] [blame] | 138 | if (mEnableDropDownDropTargets) { |
Winson Chung | 5f8afe6 | 2013-08-12 16:19:28 -0700 | [diff] [blame] | 139 | LauncherAppState app = LauncherAppState.getInstance(); |
| 140 | DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); |
| 141 | mBarHeight = grid.searchBarSpaceHeightPx; |
Winson Chung | a62e9fd | 2011-07-11 15:20:48 -0700 | [diff] [blame] | 142 | mDropTargetBar.setTranslationY(-mBarHeight); |
Michael Jurka | 66b7d01 | 2013-11-06 16:37:34 +0100 | [diff] [blame] | 143 | mDropTargetBarAnim = LauncherAnimUtils.ofFloat(mDropTargetBar, "translationY", |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 144 | -mBarHeight, 0f); |
Cristina Stancu | 476493b | 2013-08-07 17:20:14 +0100 | [diff] [blame] | 145 | |
Winson Chung | 315b3ba | 2012-05-11 10:51:32 -0700 | [diff] [blame] | 146 | } else { |
| 147 | mDropTargetBar.setAlpha(0f); |
Michael Jurka | 66b7d01 | 2013-11-06 16:37:34 +0100 | [diff] [blame] | 148 | mDropTargetBarAnim = LauncherAnimUtils.ofFloat(mDropTargetBar, "alpha", 0f, 1f); |
Winson Chung | a62e9fd | 2011-07-11 15:20:48 -0700 | [diff] [blame] | 149 | } |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 150 | setupAnimation(mDropTargetBarAnim, mDropTargetBar); |
Winson Chung | 201bc82 | 2011-06-20 15:41:53 -0700 | [diff] [blame] | 151 | } |
| 152 | |
Winson Chung | 043f2af | 2012-03-01 16:09:54 -0800 | [diff] [blame] | 153 | public void finishAnimations() { |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 154 | prepareStartAnimation(mDropTargetBar); |
| 155 | mDropTargetBarAnim.reverse(); |
| 156 | prepareStartAnimation(mQSBSearchBar); |
| 157 | mQSBSearchBarAnim.reverse(); |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 158 | } |
| 159 | |
| 160 | /* |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 161 | * Shows and hides the search bar. |
| 162 | */ |
| 163 | public void showSearchBar(boolean animated) { |
Mac Duy Hai | 8246a14 | 2013-10-16 13:46:04 +0100 | [diff] [blame] | 164 | boolean needToCancelOngoingAnimation = mQSBSearchBarAnim.isRunning() && !animated; |
| 165 | if (!mIsSearchBarHidden && !needToCancelOngoingAnimation) return; |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 166 | if (animated) { |
Winson Chung | c7d2b60 | 2012-05-16 17:02:20 -0700 | [diff] [blame] | 167 | prepareStartAnimation(mQSBSearchBar); |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 168 | mQSBSearchBarAnim.reverse(); |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 169 | } else { |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 170 | mQSBSearchBarAnim.cancel(); |
Adam Cohen | c2d6e89 | 2014-10-16 09:49:24 -0700 | [diff] [blame] | 171 | if (mQSBSearchBar != null && mEnableDropDownDropTargets) { |
Michael Jurka | 19e3347 | 2012-05-14 20:41:52 -0700 | [diff] [blame] | 172 | mQSBSearchBar.setTranslationY(0); |
Adam Cohen | c2d6e89 | 2014-10-16 09:49:24 -0700 | [diff] [blame] | 173 | } else if (mQSBSearchBar != null) { |
Michael Jurka | 324dbdd | 2012-06-18 14:31:28 -0700 | [diff] [blame] | 174 | mQSBSearchBar.setAlpha(1f); |
Michael Jurka | 19e3347 | 2012-05-14 20:41:52 -0700 | [diff] [blame] | 175 | } |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 176 | } |
| 177 | mIsSearchBarHidden = false; |
| 178 | } |
| 179 | public void hideSearchBar(boolean animated) { |
Mac Duy Hai | 8246a14 | 2013-10-16 13:46:04 +0100 | [diff] [blame] | 180 | boolean needToCancelOngoingAnimation = mQSBSearchBarAnim.isRunning() && !animated; |
| 181 | if (mIsSearchBarHidden && !needToCancelOngoingAnimation) return; |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 182 | if (animated) { |
Winson Chung | c7d2b60 | 2012-05-16 17:02:20 -0700 | [diff] [blame] | 183 | prepareStartAnimation(mQSBSearchBar); |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 184 | mQSBSearchBarAnim.start(); |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 185 | } else { |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 186 | mQSBSearchBarAnim.cancel(); |
Adam Cohen | c2d6e89 | 2014-10-16 09:49:24 -0700 | [diff] [blame] | 187 | if (mQSBSearchBar != null && mEnableDropDownDropTargets) { |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 188 | mQSBSearchBar.setTranslationY(-mBarHeight); |
Adam Cohen | c2d6e89 | 2014-10-16 09:49:24 -0700 | [diff] [blame] | 189 | } else if (mQSBSearchBar != null) { |
Michael Jurka | 324dbdd | 2012-06-18 14:31:28 -0700 | [diff] [blame] | 190 | mQSBSearchBar.setAlpha(0f); |
Michael Jurka | 19e3347 | 2012-05-14 20:41:52 -0700 | [diff] [blame] | 191 | } |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 192 | } |
| 193 | mIsSearchBarHidden = true; |
| 194 | } |
| 195 | |
| 196 | /* |
| 197 | * Gets various transition durations. |
| 198 | */ |
| 199 | public int getTransitionInDuration() { |
| 200 | return sTransitionInDuration; |
| 201 | } |
| 202 | public int getTransitionOutDuration() { |
| 203 | return sTransitionOutDuration; |
| 204 | } |
| 205 | |
| 206 | /* |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 207 | * DragController.DragListener implementation |
| 208 | */ |
| 209 | @Override |
| 210 | public void onDragStart(DragSource source, Object info, int dragAction) { |
Adam Cohen | c9735cf | 2015-01-23 16:11:55 -0800 | [diff] [blame] | 211 | showDeleteTarget(); |
| 212 | } |
| 213 | |
| 214 | public void showDeleteTarget() { |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 215 | // Animate out the QSB search bar, and animate in the drop target bar |
Winson Chung | c7d2b60 | 2012-05-16 17:02:20 -0700 | [diff] [blame] | 216 | prepareStartAnimation(mDropTargetBar); |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 217 | mDropTargetBarAnim.start(); |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 218 | if (!mIsSearchBarHidden) { |
Winson Chung | c7d2b60 | 2012-05-16 17:02:20 -0700 | [diff] [blame] | 219 | prepareStartAnimation(mQSBSearchBar); |
Winson Chung | 17f1bb8 | 2012-05-25 14:25:44 -0700 | [diff] [blame] | 220 | mQSBSearchBarAnim.start(); |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 221 | } |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 222 | } |
| 223 | |
Adam Cohen | c9735cf | 2015-01-23 16:11:55 -0800 | [diff] [blame] | 224 | public void hideDeleteTarget() { |
| 225 | // Restore the QSB search bar, and animate out the drop target bar |
| 226 | prepareStartAnimation(mDropTargetBar); |
| 227 | mDropTargetBarAnim.reverse(); |
| 228 | if (!mIsSearchBarHidden) { |
| 229 | prepareStartAnimation(mQSBSearchBar); |
| 230 | mQSBSearchBarAnim.reverse(); |
| 231 | } |
| 232 | } |
| 233 | |
Adam Cohen | d4d7aa5 | 2011-07-19 21:47:37 -0700 | [diff] [blame] | 234 | public void deferOnDragEnd() { |
| 235 | mDeferOnDragEnd = true; |
| 236 | } |
| 237 | |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 238 | @Override |
| 239 | public void onDragEnd() { |
Adam Cohen | d4d7aa5 | 2011-07-19 21:47:37 -0700 | [diff] [blame] | 240 | if (!mDeferOnDragEnd) { |
Adam Cohen | c9735cf | 2015-01-23 16:11:55 -0800 | [diff] [blame] | 241 | hideDeleteTarget(); |
Adam Cohen | d4d7aa5 | 2011-07-19 21:47:37 -0700 | [diff] [blame] | 242 | } else { |
| 243 | mDeferOnDragEnd = false; |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 244 | } |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 245 | } |
Winson Chung | c51db6a | 2011-10-05 11:44:49 -0700 | [diff] [blame] | 246 | |
Mathew Inwood | cf7f63b | 2011-10-13 11:31:38 +0100 | [diff] [blame] | 247 | public Rect getSearchBarBounds() { |
| 248 | if (mQSBSearchBar != null) { |
Mathew Inwood | cf7f63b | 2011-10-13 11:31:38 +0100 | [diff] [blame] | 249 | final int[] pos = new int[2]; |
| 250 | mQSBSearchBar.getLocationOnScreen(pos); |
| 251 | |
| 252 | final Rect rect = new Rect(); |
Michael Jurka | 629758f | 2012-06-14 16:18:21 -0700 | [diff] [blame] | 253 | rect.left = pos[0]; |
| 254 | rect.top = pos[1]; |
| 255 | rect.right = pos[0] + mQSBSearchBar.getWidth(); |
| 256 | rect.bottom = pos[1] + mQSBSearchBar.getHeight(); |
Mathew Inwood | cf7f63b | 2011-10-13 11:31:38 +0100 | [diff] [blame] | 257 | return rect; |
| 258 | } else { |
| 259 | return null; |
| 260 | } |
| 261 | } |
Winson Chung | 4c98d92 | 2011-05-31 16:50:48 -0700 | [diff] [blame] | 262 | } |