Winson Chung | 785d2eb | 2011-04-14 16:08:02 -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 | |
| 17 | package com.android.launcher2; |
| 18 | |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 19 | import android.animation.Animator; |
Winson Chung | b44b524 | 2011-06-13 11:32:14 -0700 | [diff] [blame] | 20 | import android.animation.AnimatorListenerAdapter; |
Winson Chung | f314b0e | 2011-08-16 11:54:27 -0700 | [diff] [blame^] | 21 | import android.animation.AnimatorSet; |
Winson Chung | b44b524 | 2011-06-13 11:32:14 -0700 | [diff] [blame] | 22 | import android.animation.ObjectAnimator; |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 23 | import android.content.Context; |
| 24 | import android.content.res.Resources; |
Winson Chung | f314b0e | 2011-08-16 11:54:27 -0700 | [diff] [blame^] | 25 | import android.graphics.Bitmap; |
| 26 | import android.graphics.Canvas; |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 27 | import android.util.AttributeSet; |
| 28 | import android.view.LayoutInflater; |
Winson Chung | 4179b4e | 2011-05-31 17:28:12 -0700 | [diff] [blame] | 29 | import android.view.MotionEvent; |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 30 | import android.view.View; |
| 31 | import android.view.ViewGroup; |
Winson Chung | f314b0e | 2011-08-16 11:54:27 -0700 | [diff] [blame^] | 32 | import android.view.animation.DecelerateInterpolator; |
| 33 | import android.widget.ImageView; |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 34 | import android.widget.TabHost; |
Winson Chung | faa1325 | 2011-06-13 18:15:54 -0700 | [diff] [blame] | 35 | import android.widget.TabWidget; |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 36 | import android.widget.TextView; |
| 37 | |
| 38 | import com.android.launcher.R; |
| 39 | |
| 40 | public class AppsCustomizeTabHost extends TabHost implements LauncherTransitionable, |
| 41 | TabHost.OnTabChangeListener { |
| 42 | static final String LOG_TAG = "AppsCustomizeTabHost"; |
| 43 | |
| 44 | private static final String APPS_TAB_TAG = "APPS"; |
| 45 | private static final String WIDGETS_TAB_TAG = "WIDGETS"; |
| 46 | |
| 47 | private final LayoutInflater mLayoutInflater; |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 48 | private ViewGroup mTabs; |
Winson Chung | fd3385f | 2011-06-15 19:51:24 -0700 | [diff] [blame] | 49 | private ViewGroup mTabsContainer; |
Winson Chung | 4179b4e | 2011-05-31 17:28:12 -0700 | [diff] [blame] | 50 | private AppsCustomizePagedView mAppsCustomizePane; |
Winson Chung | f314b0e | 2011-08-16 11:54:27 -0700 | [diff] [blame^] | 51 | private ImageView mAnimationBuffer; |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 52 | |
Winson Chung | c100e8e | 2011-08-09 16:02:43 -0700 | [diff] [blame] | 53 | private boolean mInTransition; |
| 54 | private boolean mResetAfterTransition; |
| 55 | |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 56 | public AppsCustomizeTabHost(Context context, AttributeSet attrs) { |
| 57 | super(context, attrs); |
| 58 | mLayoutInflater = LayoutInflater.from(context); |
| 59 | } |
| 60 | |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 61 | /** |
Winson Chung | 5a80835 | 2011-06-27 19:08:49 -0700 | [diff] [blame] | 62 | * Convenience methods to select specific tabs. We want to set the content type immediately |
| 63 | * in these cases, but we note that we still call setCurrentTabByTag() so that the tab view |
| 64 | * reflects the new content (but doesn't do the animation and logic associated with changing |
| 65 | * tabs manually). |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 66 | */ |
Winson Chung | 5a80835 | 2011-06-27 19:08:49 -0700 | [diff] [blame] | 67 | private void setContentTypeImmediate(AppsCustomizePagedView.ContentType type) { |
| 68 | onTabChangedStart(); |
| 69 | onTabChangedEnd(type); |
| 70 | } |
Winson Chung | 55b6550 | 2011-05-26 12:03:43 -0700 | [diff] [blame] | 71 | void selectAppsTab() { |
Winson Chung | 5a80835 | 2011-06-27 19:08:49 -0700 | [diff] [blame] | 72 | setContentTypeImmediate(AppsCustomizePagedView.ContentType.Applications); |
Winson Chung | 55b6550 | 2011-05-26 12:03:43 -0700 | [diff] [blame] | 73 | setCurrentTabByTag(APPS_TAB_TAG); |
| 74 | } |
| 75 | void selectWidgetsTab() { |
Winson Chung | 5a80835 | 2011-06-27 19:08:49 -0700 | [diff] [blame] | 76 | setContentTypeImmediate(AppsCustomizePagedView.ContentType.Widgets); |
| 77 | mAppsCustomizePane.setCurrentPageToWidgets(); |
| 78 | |
| 79 | setCurrentTabByTag(WIDGETS_TAB_TAG); |
| 80 | } |
Winson Chung | 55b6550 | 2011-05-26 12:03:43 -0700 | [diff] [blame] | 81 | |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 82 | /** |
| 83 | * Setup the tab host and create all necessary tabs. |
| 84 | */ |
| 85 | @Override |
| 86 | protected void onFinishInflate() { |
| 87 | // Setup the tab host |
| 88 | setup(); |
| 89 | |
Winson Chung | fd3385f | 2011-06-15 19:51:24 -0700 | [diff] [blame] | 90 | final ViewGroup tabsContainer = (ViewGroup) findViewById(R.id.tabs_container); |
Winson Chung | faa1325 | 2011-06-13 18:15:54 -0700 | [diff] [blame] | 91 | final TabWidget tabs = (TabWidget) findViewById(com.android.internal.R.id.tabs); |
Winson Chung | 4179b4e | 2011-05-31 17:28:12 -0700 | [diff] [blame] | 92 | final AppsCustomizePagedView appsCustomizePane = (AppsCustomizePagedView) |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 93 | findViewById(R.id.apps_customize_pane_content); |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 94 | mTabs = tabs; |
Winson Chung | fd3385f | 2011-06-15 19:51:24 -0700 | [diff] [blame] | 95 | mTabsContainer = tabsContainer; |
Winson Chung | 4179b4e | 2011-05-31 17:28:12 -0700 | [diff] [blame] | 96 | mAppsCustomizePane = appsCustomizePane; |
Winson Chung | f314b0e | 2011-08-16 11:54:27 -0700 | [diff] [blame^] | 97 | mAnimationBuffer = (ImageView) findViewById(R.id.animation_buffer); |
Winson Chung | 4179b4e | 2011-05-31 17:28:12 -0700 | [diff] [blame] | 98 | if (tabs == null || mAppsCustomizePane == null) throw new Resources.NotFoundException(); |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 99 | |
| 100 | // Configure the tabs content factory to return the same paged view (that we change the |
| 101 | // content filter on) |
| 102 | TabContentFactory contentFactory = new TabContentFactory() { |
| 103 | public View createTabContent(String tag) { |
Winson Chung | 4179b4e | 2011-05-31 17:28:12 -0700 | [diff] [blame] | 104 | return appsCustomizePane; |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 105 | } |
| 106 | }; |
| 107 | |
| 108 | // Create the tabs |
| 109 | TextView tabView; |
| 110 | tabView = (TextView) mLayoutInflater.inflate(R.layout.tab_widget_indicator, tabs, false); |
| 111 | tabView.setText(mContext.getString(R.string.all_apps_button_label)); |
| 112 | addTab(newTabSpec(APPS_TAB_TAG).setIndicator(tabView).setContent(contentFactory)); |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 113 | tabView = (TextView) mLayoutInflater.inflate(R.layout.tab_widget_indicator, tabs, false); |
| 114 | tabView.setText(mContext.getString(R.string.widgets_tab_label)); |
| 115 | addTab(newTabSpec(WIDGETS_TAB_TAG).setIndicator(tabView).setContent(contentFactory)); |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 116 | setOnTabChangedListener(this); |
Winson Chung | faa1325 | 2011-06-13 18:15:54 -0700 | [diff] [blame] | 117 | |
| 118 | // Setup the key listener to jump between the last tab view and the market icon |
| 119 | AppsCustomizeTabKeyEventListener keyListener = new AppsCustomizeTabKeyEventListener(); |
| 120 | View lastTab = tabs.getChildTabViewAt(tabs.getTabCount() - 1); |
| 121 | lastTab.setOnKeyListener(keyListener); |
| 122 | View shopButton = findViewById(R.id.market_button); |
| 123 | shopButton.setOnKeyListener(keyListener); |
Winson Chung | fd3385f | 2011-06-15 19:51:24 -0700 | [diff] [blame] | 124 | |
| 125 | // Hide the tab bar until we measure |
| 126 | mTabsContainer.setAlpha(0f); |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 127 | } |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 128 | |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 129 | @Override |
| 130 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { |
| 131 | boolean remeasureTabWidth = (mTabs.getLayoutParams().width <= 0); |
| 132 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); |
| 133 | |
| 134 | // Set the width of the tab list to the content width |
| 135 | if (remeasureTabWidth) { |
Winson Chung | fd3385f | 2011-06-15 19:51:24 -0700 | [diff] [blame] | 136 | int contentWidth = mAppsCustomizePane.getPageContentWidth(); |
| 137 | if (contentWidth > 0) { |
| 138 | // Set the width and show the tab bar (if we have a loading graphic, we can switch |
| 139 | // it off here) |
| 140 | mTabs.getLayoutParams().width = contentWidth; |
Winson Chung | f30ad5f | 2011-08-08 10:55:42 -0700 | [diff] [blame] | 141 | mTabsContainer.setAlpha(1f); |
Michael Jurka | c57b7a8 | 2011-08-09 22:02:20 -0700 | [diff] [blame] | 142 | post(new Runnable() { |
| 143 | public void run() { |
| 144 | mTabs.requestLayout(); |
| 145 | } |
| 146 | }); |
Winson Chung | fd3385f | 2011-06-15 19:51:24 -0700 | [diff] [blame] | 147 | } |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 148 | } |
Winson Chung | fd3385f | 2011-06-15 19:51:24 -0700 | [diff] [blame] | 149 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); |
Winson Chung | 4179b4e | 2011-05-31 17:28:12 -0700 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | @Override |
| 153 | public boolean onTouchEvent(MotionEvent event) { |
| 154 | // Intercept all touch events up to the bottom of the AppsCustomizePane so they do not fall |
| 155 | // through to the workspace and trigger showWorkspace() |
| 156 | if (event.getY() < mAppsCustomizePane.getBottom()) { |
| 157 | return true; |
| 158 | } |
| 159 | return super.onTouchEvent(event); |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 160 | } |
| 161 | |
Winson Chung | 5a80835 | 2011-06-27 19:08:49 -0700 | [diff] [blame] | 162 | private void onTabChangedStart() { |
| 163 | mAppsCustomizePane.hideScrollingIndicator(false); |
| 164 | } |
| 165 | private void onTabChangedEnd(AppsCustomizePagedView.ContentType type) { |
| 166 | mAppsCustomizePane.setContentType(type); |
| 167 | } |
| 168 | |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 169 | @Override |
| 170 | public void onTabChanged(String tabId) { |
Winson Chung | b44b524 | 2011-06-13 11:32:14 -0700 | [diff] [blame] | 171 | final AppsCustomizePagedView.ContentType type = getContentTypeForTabTag(tabId); |
| 172 | if (!mAppsCustomizePane.isContentType(type)) { |
| 173 | // Animate the changing of the tab content by fading pages in and out |
| 174 | final Resources res = getResources(); |
| 175 | final int duration = res.getInteger(R.integer.config_tabTransitionDuration); |
| 176 | |
Winson Chung | f314b0e | 2011-08-16 11:54:27 -0700 | [diff] [blame^] | 177 | // We post a runnable here because there is a delay while the first page is loading and |
| 178 | // the feedback from having changed the tab almost feels better than having it stick |
| 179 | post(new Runnable() { |
Winson Chung | b44b524 | 2011-06-13 11:32:14 -0700 | [diff] [blame] | 180 | @Override |
Winson Chung | f314b0e | 2011-08-16 11:54:27 -0700 | [diff] [blame^] | 181 | public void run() { |
| 182 | // Setup the animation buffer |
| 183 | Bitmap b = Bitmap.createBitmap(mAppsCustomizePane.getMeasuredWidth(), |
| 184 | mAppsCustomizePane.getMeasuredHeight(), Bitmap.Config.ARGB_8888); |
| 185 | Canvas c = new Canvas(b); |
| 186 | mAppsCustomizePane.draw(c); |
| 187 | mAppsCustomizePane.setAlpha(0f); |
| 188 | mAnimationBuffer.setImageBitmap(b); |
| 189 | mAnimationBuffer.setAlpha(1f); |
| 190 | mAnimationBuffer.setVisibility(View.VISIBLE); |
| 191 | c.setBitmap(null); |
| 192 | b = null; |
| 193 | |
| 194 | // Toggle the new content |
Winson Chung | 5a80835 | 2011-06-27 19:08:49 -0700 | [diff] [blame] | 195 | onTabChangedStart(); |
Winson Chung | 5a80835 | 2011-06-27 19:08:49 -0700 | [diff] [blame] | 196 | onTabChangedEnd(type); |
Winson Chung | b44b524 | 2011-06-13 11:32:14 -0700 | [diff] [blame] | 197 | |
Winson Chung | f314b0e | 2011-08-16 11:54:27 -0700 | [diff] [blame^] | 198 | // Animate the transition |
| 199 | ObjectAnimator outAnim = ObjectAnimator.ofFloat(mAnimationBuffer, "alpha", 0f); |
| 200 | outAnim.addListener(new AnimatorListenerAdapter() { |
Winson Chung | 3ac74c5 | 2011-06-30 17:39:37 -0700 | [diff] [blame] | 201 | @Override |
Winson Chung | f314b0e | 2011-08-16 11:54:27 -0700 | [diff] [blame^] | 202 | public void onAnimationEnd(Animator animation) { |
| 203 | mAnimationBuffer.setVisibility(View.GONE); |
| 204 | mAnimationBuffer.setImageBitmap(null); |
| 205 | } |
| 206 | }); |
| 207 | ObjectAnimator inAnim = ObjectAnimator.ofFloat(mAppsCustomizePane, "alpha", 1f); |
| 208 | inAnim.addListener(new AnimatorListenerAdapter() { |
| 209 | @Override |
| 210 | public void onAnimationEnd(Animator animation) { |
Winson Chung | 4afe9b3 | 2011-07-27 17:46:20 -0700 | [diff] [blame] | 211 | if (!LauncherApplication.isScreenLarge()) { |
| 212 | mAppsCustomizePane.flashScrollingIndicator(); |
| 213 | } |
Winson Chung | f314b0e | 2011-08-16 11:54:27 -0700 | [diff] [blame^] | 214 | mAppsCustomizePane.loadAssociatedPages( |
| 215 | mAppsCustomizePane.getCurrentPage()); |
Winson Chung | 3ac74c5 | 2011-06-30 17:39:37 -0700 | [diff] [blame] | 216 | } |
| 217 | }); |
Winson Chung | f314b0e | 2011-08-16 11:54:27 -0700 | [diff] [blame^] | 218 | AnimatorSet animSet = new AnimatorSet(); |
| 219 | animSet.playTogether(outAnim, inAnim); |
| 220 | animSet.setDuration(duration); |
| 221 | animSet.start(); |
Winson Chung | b44b524 | 2011-06-13 11:32:14 -0700 | [diff] [blame] | 222 | } |
| 223 | }); |
Winson Chung | b44b524 | 2011-06-13 11:32:14 -0700 | [diff] [blame] | 224 | } |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 225 | } |
| 226 | |
| 227 | /** |
| 228 | * Returns the content type for the specified tab tag. |
| 229 | */ |
| 230 | public AppsCustomizePagedView.ContentType getContentTypeForTabTag(String tag) { |
| 231 | if (tag.equals(APPS_TAB_TAG)) { |
| 232 | return AppsCustomizePagedView.ContentType.Applications; |
| 233 | } else if (tag.equals(WIDGETS_TAB_TAG)) { |
| 234 | return AppsCustomizePagedView.ContentType.Widgets; |
| 235 | } |
| 236 | return AppsCustomizePagedView.ContentType.Applications; |
| 237 | } |
| 238 | |
| 239 | /** |
Winson Chung | fc79c80 | 2011-05-02 13:35:34 -0700 | [diff] [blame] | 240 | * Returns the tab tag for a given content type. |
| 241 | */ |
| 242 | public String getTabTagForContentType(AppsCustomizePagedView.ContentType type) { |
| 243 | if (type == AppsCustomizePagedView.ContentType.Applications) { |
| 244 | return APPS_TAB_TAG; |
| 245 | } else if (type == AppsCustomizePagedView.ContentType.Widgets) { |
| 246 | return WIDGETS_TAB_TAG; |
| 247 | } |
| 248 | return APPS_TAB_TAG; |
| 249 | } |
| 250 | |
| 251 | /** |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 252 | * Disable focus on anything under this view in the hierarchy if we are not visible. |
| 253 | */ |
| 254 | @Override |
| 255 | public int getDescendantFocusability() { |
| 256 | if (getVisibility() != View.VISIBLE) { |
| 257 | return ViewGroup.FOCUS_BLOCK_DESCENDANTS; |
| 258 | } |
| 259 | return super.getDescendantFocusability(); |
| 260 | } |
| 261 | |
Winson Chung | c100e8e | 2011-08-09 16:02:43 -0700 | [diff] [blame] | 262 | void reset() { |
| 263 | if (mInTransition) { |
| 264 | // Defer to after the transition to reset |
| 265 | mResetAfterTransition = true; |
| 266 | } else { |
| 267 | // Reset immediately |
| 268 | mAppsCustomizePane.reset(); |
| 269 | } |
| 270 | } |
| 271 | |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 272 | /* LauncherTransitionable overrides */ |
| 273 | @Override |
Winson Chung | 5a80835 | 2011-06-27 19:08:49 -0700 | [diff] [blame] | 274 | public void onLauncherTransitionStart(Animator animation, boolean toWorkspace) { |
Winson Chung | c100e8e | 2011-08-09 16:02:43 -0700 | [diff] [blame] | 275 | mInTransition = true; |
Michael Jurka | 19e0fc5 | 2011-07-22 18:00:21 -0700 | [diff] [blame] | 276 | // isHardwareAccelerated() checks if we're attached to a window and if that |
| 277 | // window is HW accelerated-- we were sometimes not attached to a window |
| 278 | // and buildLayer was throwing an IllegalStateException |
| 279 | if (animation != null && isHardwareAccelerated()) { |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 280 | // Turn on hardware layers for performance |
| 281 | setLayerType(LAYER_TYPE_HARDWARE, null); |
| 282 | |
| 283 | // force building the layer at the beginning of the animation, so you don't get a |
| 284 | // blip early in the animation |
| 285 | buildLayer(); |
| 286 | } |
Michael Jurka | 430e8a5 | 2011-08-08 15:52:14 -0700 | [diff] [blame] | 287 | if (!toWorkspace && !LauncherApplication.isScreenLarge()) { |
| 288 | mAppsCustomizePane.showScrollingIndicator(false); |
| 289 | } |
Winson Chung | c100e8e | 2011-08-09 16:02:43 -0700 | [diff] [blame] | 290 | if (mResetAfterTransition) { |
| 291 | mAppsCustomizePane.reset(); |
| 292 | mResetAfterTransition = false; |
| 293 | } |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 294 | } |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 295 | |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 296 | @Override |
Winson Chung | 5a80835 | 2011-06-27 19:08:49 -0700 | [diff] [blame] | 297 | public void onLauncherTransitionEnd(Animator animation, boolean toWorkspace) { |
Winson Chung | c100e8e | 2011-08-09 16:02:43 -0700 | [diff] [blame] | 298 | mInTransition = false; |
Winson Chung | f0ea4d3 | 2011-06-06 14:27:16 -0700 | [diff] [blame] | 299 | if (animation != null) { |
| 300 | setLayerType(LAYER_TYPE_NONE, null); |
| 301 | } |
Winson Chung | 3ac74c5 | 2011-06-30 17:39:37 -0700 | [diff] [blame] | 302 | |
Winson Chung | 4afe9b3 | 2011-07-27 17:46:20 -0700 | [diff] [blame] | 303 | if (!toWorkspace && !LauncherApplication.isScreenLarge()) { |
Michael Jurka | 430e8a5 | 2011-08-08 15:52:14 -0700 | [diff] [blame] | 304 | mAppsCustomizePane.hideScrollingIndicator(false); |
Winson Chung | 5a80835 | 2011-06-27 19:08:49 -0700 | [diff] [blame] | 305 | } |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 306 | } |
Winson Chung | 70d7210 | 2011-08-12 11:24:35 -0700 | [diff] [blame] | 307 | |
| 308 | boolean isTransitioning() { |
| 309 | return mInTransition; |
| 310 | } |
Winson Chung | 785d2eb | 2011-04-14 16:08:02 -0700 | [diff] [blame] | 311 | } |