Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [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 | |
| 17 | package com.android.systemui.statusbar.policy; |
| 18 | |
Daniel Sandler | c6d29fc | 2012-02-25 00:33:12 -0500 | [diff] [blame] | 19 | import android.animation.LayoutTransition; |
Daniel Sandler | 1cdf067 | 2011-09-07 22:13:29 -0400 | [diff] [blame] | 20 | import android.animation.ValueAnimator; |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 21 | import android.content.Context; |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 22 | import android.content.res.Configuration; |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 23 | import android.graphics.Rect; |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 24 | import android.util.AttributeSet; |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 25 | import android.util.Log; |
Daniel Sandler | ad6352b | 2011-06-13 11:43:45 -0400 | [diff] [blame] | 26 | import android.view.MotionEvent; |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 27 | import android.view.View; |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 28 | import android.view.ViewConfiguration; |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 29 | import android.view.ViewGroup; |
Daniel Sandler | c6d29fc | 2012-02-25 00:33:12 -0500 | [diff] [blame] | 30 | import android.widget.LinearLayout; |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 31 | |
Daniel Sandler | 6a858c3 | 2012-03-12 14:38:58 -0400 | [diff] [blame] | 32 | import com.android.systemui.ExpandHelper; |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 33 | import com.android.systemui.R; |
| 34 | import com.android.systemui.SwipeHelper; |
Chris Wren | 51c7510 | 2013-07-16 20:49:17 -0400 | [diff] [blame] | 35 | import com.android.systemui.statusbar.ExpandableNotificationRow; |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 36 | |
Daniel Sandler | 1cdf067 | 2011-09-07 22:13:29 -0400 | [diff] [blame] | 37 | import java.util.HashMap; |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 38 | |
John Spurlock | 209bede | 2013-07-17 12:23:27 -0400 | [diff] [blame] | 39 | public class NotificationRowLayout |
| 40 | extends LinearLayout |
Daniel Sandler | 3d32a24 | 2012-06-05 13:44:14 -0400 | [diff] [blame] | 41 | implements SwipeHelper.Callback, ExpandHelper.Callback |
Daniel Sandler | 6a858c3 | 2012-03-12 14:38:58 -0400 | [diff] [blame] | 42 | { |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 43 | private static final String TAG = "NotificationRowLayout"; |
| 44 | private static final boolean DEBUG = false; |
Daniel Sandler | 1cdf067 | 2011-09-07 22:13:29 -0400 | [diff] [blame] | 45 | private static final boolean SLOW_ANIMATIONS = DEBUG; |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 46 | |
Daniel Sandler | ad6352b | 2011-06-13 11:43:45 -0400 | [diff] [blame] | 47 | private static final int APPEAR_ANIM_LEN = SLOW_ANIMATIONS ? 5000 : 250; |
| 48 | private static final int DISAPPEAR_ANIM_LEN = APPEAR_ANIM_LEN; |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 49 | |
Daniel Sandler | 8ba33c9 | 2011-10-04 21:49:30 -0400 | [diff] [blame] | 50 | boolean mAnimateBounds = true; |
| 51 | |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 52 | Rect mTmpRect = new Rect(); |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 53 | |
Daniel Sandler | 1cdf067 | 2011-09-07 22:13:29 -0400 | [diff] [blame] | 54 | HashMap<View, ValueAnimator> mAppearingViews = new HashMap<View, ValueAnimator>(); |
| 55 | HashMap<View, ValueAnimator> mDisappearingViews = new HashMap<View, ValueAnimator>(); |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 56 | |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 57 | private SwipeHelper mSwipeHelper; |
John Spurlock | 209bede | 2013-07-17 12:23:27 -0400 | [diff] [blame] | 58 | |
Daniel Sandler | 3d32a24 | 2012-06-05 13:44:14 -0400 | [diff] [blame] | 59 | private OnSizeChangedListener mOnSizeChangedListener; |
Daniel Sandler | ad6352b | 2011-06-13 11:43:45 -0400 | [diff] [blame] | 60 | |
Chet Haase | 2f2022a | 2011-10-11 06:41:59 -0700 | [diff] [blame] | 61 | // Flag set during notification removal animation to avoid causing too much work until |
| 62 | // animation is done |
| 63 | boolean mRemoveViews = true; |
| 64 | |
Daniel Sandler | e5011a3 | 2012-06-11 16:07:52 -0400 | [diff] [blame] | 65 | private LayoutTransition mRealLayoutTransition; |
| 66 | |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 67 | public NotificationRowLayout(Context context, AttributeSet attrs) { |
| 68 | this(context, attrs, 0); |
| 69 | } |
| 70 | |
| 71 | public NotificationRowLayout(Context context, AttributeSet attrs, int defStyle) { |
| 72 | super(context, attrs, defStyle); |
| 73 | |
Daniel Sandler | e5011a3 | 2012-06-11 16:07:52 -0400 | [diff] [blame] | 74 | mRealLayoutTransition = new LayoutTransition(); |
Daniel Sandler | 5050813 | 2012-08-16 14:10:53 -0400 | [diff] [blame] | 75 | mRealLayoutTransition.setAnimateParentHierarchy(true); |
Daniel Sandler | e5011a3 | 2012-06-11 16:07:52 -0400 | [diff] [blame] | 76 | setLayoutTransitionsEnabled(true); |
John Spurlock | 209bede | 2013-07-17 12:23:27 -0400 | [diff] [blame] | 77 | |
Daniel Sandler | c6d29fc | 2012-02-25 00:33:12 -0500 | [diff] [blame] | 78 | setOrientation(LinearLayout.VERTICAL); |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 79 | |
| 80 | if (DEBUG) { |
| 81 | setOnHierarchyChangeListener(new ViewGroup.OnHierarchyChangeListener() { |
| 82 | @Override |
| 83 | public void onChildViewAdded(View parent, View child) { |
John Spurlock | cd686b5 | 2013-06-05 10:13:46 -0400 | [diff] [blame] | 84 | Log.d(TAG, "view added: " + child + "; new count: " + getChildCount()); |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 85 | } |
| 86 | @Override |
| 87 | public void onChildViewRemoved(View parent, View child) { |
John Spurlock | cd686b5 | 2013-06-05 10:13:46 -0400 | [diff] [blame] | 88 | Log.d(TAG, "view removed: " + child + "; new count: " + (getChildCount() - 1)); |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 89 | } |
| 90 | }); |
| 91 | |
| 92 | setBackgroundColor(0x80FF8000); |
| 93 | } |
| 94 | |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 95 | float densityScale = getResources().getDisplayMetrics().density; |
John Spurlock | 0153478 | 2014-01-13 11:59:22 -0500 | [diff] [blame] | 96 | float pagingTouchSlop = ViewConfiguration.get(getContext()).getScaledPagingTouchSlop(); |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 97 | mSwipeHelper = new SwipeHelper(SwipeHelper.X, this, densityScale, pagingTouchSlop); |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 98 | } |
| 99 | |
Daniel Sandler | f7a1956 | 2012-04-04 14:04:21 -0400 | [diff] [blame] | 100 | public void setLongPressListener(View.OnLongClickListener listener) { |
| 101 | mSwipeHelper.setLongPressListener(listener); |
| 102 | } |
| 103 | |
Daniel Sandler | 3d32a24 | 2012-06-05 13:44:14 -0400 | [diff] [blame] | 104 | public void setOnSizeChangedListener(OnSizeChangedListener l) { |
| 105 | mOnSizeChangedListener = l; |
| 106 | } |
| 107 | |
Daniel Sandler | 469e96e | 2012-05-04 15:56:19 -0400 | [diff] [blame] | 108 | @Override |
| 109 | public void onWindowFocusChanged(boolean hasWindowFocus) { |
| 110 | super.onWindowFocusChanged(hasWindowFocus); |
| 111 | if (!hasWindowFocus) { |
| 112 | mSwipeHelper.removeLongPressCallback(); |
| 113 | } |
| 114 | } |
| 115 | |
Daniel Sandler | 8ba33c9 | 2011-10-04 21:49:30 -0400 | [diff] [blame] | 116 | public void setAnimateBounds(boolean anim) { |
| 117 | mAnimateBounds = anim; |
| 118 | } |
| 119 | |
Daniel Sandler | 6a858c3 | 2012-03-12 14:38:58 -0400 | [diff] [blame] | 120 | private void logLayoutTransition() { |
| 121 | Log.v(TAG, "layout " + |
Daniel Sandler | e5011a3 | 2012-06-11 16:07:52 -0400 | [diff] [blame] | 122 | (mRealLayoutTransition.isChangingLayout() ? "is " : "is not ") + |
Daniel Sandler | 6a858c3 | 2012-03-12 14:38:58 -0400 | [diff] [blame] | 123 | "in transition and animations " + |
Daniel Sandler | e5011a3 | 2012-06-11 16:07:52 -0400 | [diff] [blame] | 124 | (mRealLayoutTransition.isRunning() ? "are " : "are not ") + |
Daniel Sandler | 6a858c3 | 2012-03-12 14:38:58 -0400 | [diff] [blame] | 125 | "running."); |
| 126 | } |
| 127 | |
Daniel Sandler | ad6352b | 2011-06-13 11:43:45 -0400 | [diff] [blame] | 128 | @Override |
| 129 | public boolean onInterceptTouchEvent(MotionEvent ev) { |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 130 | if (DEBUG) Log.v(TAG, "onInterceptTouchEvent()"); |
Daniel Sandler | 6a858c3 | 2012-03-12 14:38:58 -0400 | [diff] [blame] | 131 | if (DEBUG) logLayoutTransition(); |
| 132 | |
Chris Wren | 5de6e94 | 2012-05-16 14:22:21 -0400 | [diff] [blame] | 133 | return mSwipeHelper.onInterceptTouchEvent(ev) || |
| 134 | super.onInterceptTouchEvent(ev); |
Daniel Sandler | ebce011 | 2011-06-16 16:44:51 -0400 | [diff] [blame] | 135 | } |
| 136 | |
Daniel Sandler | ad6352b | 2011-06-13 11:43:45 -0400 | [diff] [blame] | 137 | @Override |
| 138 | public boolean onTouchEvent(MotionEvent ev) { |
Daniel Sandler | 6a858c3 | 2012-03-12 14:38:58 -0400 | [diff] [blame] | 139 | if (DEBUG) Log.v(TAG, "onTouchEvent()"); |
| 140 | if (DEBUG) logLayoutTransition(); |
Chris Wren | 5de6e94 | 2012-05-16 14:22:21 -0400 | [diff] [blame] | 141 | |
| 142 | return mSwipeHelper.onTouchEvent(ev) || |
| 143 | super.onTouchEvent(ev); |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 144 | } |
Daniel Sandler | ad6352b | 2011-06-13 11:43:45 -0400 | [diff] [blame] | 145 | |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 146 | public boolean canChildBeDismissed(View v) { |
| 147 | final View veto = v.findViewById(R.id.veto); |
| 148 | return (veto != null && veto.getVisibility() != View.GONE); |
| 149 | } |
Daniel Sandler | ad6352b | 2011-06-13 11:43:45 -0400 | [diff] [blame] | 150 | |
Chris Wren | 80a7627 | 2012-04-18 10:52:18 -0400 | [diff] [blame] | 151 | public boolean canChildBeExpanded(View v) { |
Chris Wren | 51c7510 | 2013-07-16 20:49:17 -0400 | [diff] [blame] | 152 | return v instanceof ExpandableNotificationRow |
| 153 | && ((ExpandableNotificationRow) v).isExpandable(); |
Chris Wren | 8fd1265 | 2012-05-09 21:25:57 -0400 | [diff] [blame] | 154 | } |
| 155 | |
Chris Wren | 51c7510 | 2013-07-16 20:49:17 -0400 | [diff] [blame] | 156 | public void setUserExpandedChild(View v, boolean userExpanded) { |
| 157 | if (v instanceof ExpandableNotificationRow) { |
| 158 | ((ExpandableNotificationRow) v).setUserExpanded(userExpanded); |
| 159 | } |
Chris Wren | 80a7627 | 2012-04-18 10:52:18 -0400 | [diff] [blame] | 160 | } |
| 161 | |
Chris Wren | 51c7510 | 2013-07-16 20:49:17 -0400 | [diff] [blame] | 162 | public void setUserLockedChild(View v, boolean userLocked) { |
| 163 | if (v instanceof ExpandableNotificationRow) { |
| 164 | ((ExpandableNotificationRow) v).setUserLocked(userLocked); |
| 165 | } |
Chris Wren | 3ddab0d | 2012-08-02 16:52:21 -0400 | [diff] [blame] | 166 | } |
| 167 | |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 168 | public void onChildDismissed(View v) { |
John Spurlock | cd686b5 | 2013-06-05 10:13:46 -0400 | [diff] [blame] | 169 | if (DEBUG) Log.v(TAG, "onChildDismissed: " + v + " mRemoveViews=" + mRemoveViews); |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 170 | final View veto = v.findViewById(R.id.veto); |
Chet Haase | 2f2022a | 2011-10-11 06:41:59 -0700 | [diff] [blame] | 171 | if (veto != null && veto.getVisibility() != View.GONE && mRemoveViews) { |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 172 | veto.performClick(); |
Daniel Sandler | ad6352b | 2011-06-13 11:43:45 -0400 | [diff] [blame] | 173 | } |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 174 | } |
| 175 | |
| 176 | public void onBeginDrag(View v) { |
| 177 | // We need to prevent the surrounding ScrollView from intercepting us now; |
| 178 | // the scroll position will be locked while we swipe |
| 179 | requestDisallowInterceptTouchEvent(true); |
| 180 | } |
| 181 | |
Peter Ng | 622a976 | 2011-08-29 10:56:53 -0700 | [diff] [blame] | 182 | public void onDragCancelled(View v) { |
| 183 | } |
| 184 | |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 185 | public View getChildAtPosition(MotionEvent ev) { |
Daniel Sandler | 6a858c3 | 2012-03-12 14:38:58 -0400 | [diff] [blame] | 186 | return getChildAtPosition(ev.getX(), ev.getY()); |
| 187 | } |
Chris Wren | 5de6e94 | 2012-05-16 14:22:21 -0400 | [diff] [blame] | 188 | |
| 189 | public View getChildAtRawPosition(float touchX, float touchY) { |
| 190 | int[] location = new int[2]; |
| 191 | getLocationOnScreen(location); |
| 192 | return getChildAtPosition((float) (touchX - location[0]), (float) (touchY - location[1])); |
| 193 | } |
| 194 | |
Daniel Sandler | 6a858c3 | 2012-03-12 14:38:58 -0400 | [diff] [blame] | 195 | public View getChildAtPosition(float touchX, float touchY) { |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 196 | // find the view under the pointer, accounting for GONE views |
| 197 | final int count = getChildCount(); |
| 198 | int y = 0; |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 199 | int childIdx = 0; |
| 200 | View slidingChild; |
| 201 | for (; childIdx < count; childIdx++) { |
| 202 | slidingChild = getChildAt(childIdx); |
| 203 | if (slidingChild.getVisibility() == GONE) { |
| 204 | continue; |
| 205 | } |
Daniel Sandler | c6d29fc | 2012-02-25 00:33:12 -0500 | [diff] [blame] | 206 | y += slidingChild.getMeasuredHeight(); |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 207 | if (touchY < y) return slidingChild; |
| 208 | } |
| 209 | return null; |
| 210 | } |
| 211 | |
| 212 | public View getChildContentView(View v) { |
| 213 | return v; |
| 214 | } |
| 215 | |
| 216 | @Override |
| 217 | protected void onConfigurationChanged(Configuration newConfig) { |
| 218 | super.onConfigurationChanged(newConfig); |
| 219 | float densityScale = getResources().getDisplayMetrics().density; |
| 220 | mSwipeHelper.setDensityScale(densityScale); |
John Spurlock | 0153478 | 2014-01-13 11:59:22 -0500 | [diff] [blame] | 221 | float pagingTouchSlop = ViewConfiguration.get(getContext()).getScaledPagingTouchSlop(); |
Michael Jurka | 07d4046 | 2011-07-19 10:54:38 -0700 | [diff] [blame] | 222 | mSwipeHelper.setPagingTouchSlop(pagingTouchSlop); |
Daniel Sandler | ad6352b | 2011-06-13 11:43:45 -0400 | [diff] [blame] | 223 | } |
| 224 | |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 225 | |
Chet Haase | 2f2022a | 2011-10-11 06:41:59 -0700 | [diff] [blame] | 226 | /** |
| 227 | * Sets a flag to tell us whether to actually remove views. Removal is delayed by setting this |
| 228 | * to false during some animations to smooth out performance. Callers should restore the |
| 229 | * flag to true after the animation is done, and then they should make sure that the views |
| 230 | * get removed properly. |
| 231 | */ |
| 232 | public void setViewRemoval(boolean removeViews) { |
John Spurlock | cd686b5 | 2013-06-05 10:13:46 -0400 | [diff] [blame] | 233 | if (DEBUG) Log.v(TAG, "setViewRemoval: " + removeViews); |
Chet Haase | 2f2022a | 2011-10-11 06:41:59 -0700 | [diff] [blame] | 234 | mRemoveViews = removeViews; |
| 235 | } |
| 236 | |
Daniel Sandler | e5011a3 | 2012-06-11 16:07:52 -0400 | [diff] [blame] | 237 | // Suppress layout transitions for a little while. |
| 238 | public void setLayoutTransitionsEnabled(boolean b) { |
| 239 | if (b) { |
| 240 | setLayoutTransition(mRealLayoutTransition); |
| 241 | } else { |
| 242 | if (mRealLayoutTransition.isRunning()) { |
| 243 | mRealLayoutTransition.cancel(); |
| 244 | } |
| 245 | setLayoutTransition(null); |
| 246 | } |
| 247 | } |
| 248 | |
Daniel Sandler | 8ba33c9 | 2011-10-04 21:49:30 -0400 | [diff] [blame] | 249 | public void dismissRowAnimated(View child) { |
| 250 | dismissRowAnimated(child, 0); |
| 251 | } |
| 252 | |
| 253 | public void dismissRowAnimated(View child, int vel) { |
| 254 | mSwipeHelper.dismissChild(child, vel); |
| 255 | } |
| 256 | |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 257 | @Override |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 258 | public void onFinishInflate() { |
| 259 | super.onFinishInflate(); |
Daniel Sandler | c6d29fc | 2012-02-25 00:33:12 -0500 | [diff] [blame] | 260 | if (DEBUG) setWillNotDraw(false); |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 261 | } |
| 262 | |
| 263 | @Override |
| 264 | public void onDraw(android.graphics.Canvas c) { |
| 265 | super.onDraw(c); |
Daniel Sandler | 6a858c3 | 2012-03-12 14:38:58 -0400 | [diff] [blame] | 266 | if (DEBUG) logLayoutTransition(); |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 267 | if (DEBUG) { |
John Spurlock | cd686b5 | 2013-06-05 10:13:46 -0400 | [diff] [blame] | 268 | //Log.d(TAG, "onDraw: canvas height: " + c.getHeight() + "px; measured height: " |
Daniel Sandler | ad6352b | 2011-06-13 11:43:45 -0400 | [diff] [blame] | 269 | // + getMeasuredHeight() + "px"); |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 270 | c.save(); |
| 271 | c.clipRect(6, 6, c.getWidth() - 6, getMeasuredHeight() - 6, |
| 272 | android.graphics.Region.Op.DIFFERENCE); |
| 273 | c.drawColor(0xFFFF8000); |
| 274 | c.restore(); |
| 275 | } |
| 276 | } |
Daniel Sandler | 3d32a24 | 2012-06-05 13:44:14 -0400 | [diff] [blame] | 277 | |
| 278 | @Override |
| 279 | protected void onSizeChanged(int w, int h, int oldw, int oldh) { |
| 280 | if (mOnSizeChangedListener != null) { |
| 281 | mOnSizeChangedListener.onSizeChanged(this, w, h, oldw, oldh); |
| 282 | } |
| 283 | } |
Daniel Sandler | d42497e | 2011-06-04 00:32:50 -0400 | [diff] [blame] | 284 | } |