Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.widget.accessibility; | 5 package org.chromium.chrome.browser.widget.accessibility; |
| 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.AnimatorSet; | 9 import android.animation.AnimatorSet; |
| 10 import android.animation.ObjectAnimator; | 10 import android.animation.ObjectAnimator; |
| 11 import android.annotation.SuppressLint; | |
| 11 import android.content.Context; | 12 import android.content.Context; |
| 12 import android.graphics.Bitmap; | 13 import android.graphics.Bitmap; |
| 13 import android.os.Handler; | 14 import android.os.Handler; |
| 14 import android.text.TextUtils; | 15 import android.text.TextUtils; |
| 15 import android.util.AttributeSet; | 16 import android.util.AttributeSet; |
| 16 import android.view.GestureDetector; | 17 import android.view.GestureDetector; |
| 17 import android.view.MotionEvent; | 18 import android.view.MotionEvent; |
| 18 import android.view.View; | 19 import android.view.View; |
| 19 import android.view.View.OnClickListener; | 20 import android.view.View.OnClickListener; |
| 20 import android.view.ViewGroup; | 21 import android.view.ViewGroup; |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 396 return true; | 397 return true; |
| 397 } | 398 } |
| 398 return super.onTouchEvent(e); | 399 return super.onTouchEvent(e); |
| 399 } | 400 } |
| 400 | 401 |
| 401 /** | 402 /** |
| 402 * This call is exposed for the benefit of the animators. | 403 * This call is exposed for the benefit of the animators. |
| 403 * | 404 * |
| 404 * @param height The height of the current view. | 405 * @param height The height of the current view. |
| 405 */ | 406 */ |
| 407 // TODO(crbug.com/635567): Fix this properly. | |
|
Ted C
2017/04/27 19:02:47
Let's just add @UsedByReflection and remove the to
F
2017/04/28 18:25:15
Done.
| |
| 408 @SuppressLint("AnimatorKeep") | |
| 406 public void setHeight(int height) { | 409 public void setHeight(int height) { |
| 407 AbsListView.LayoutParams params = (AbsListView.LayoutParams) getLayoutPa rams(); | 410 AbsListView.LayoutParams params = (AbsListView.LayoutParams) getLayoutPa rams(); |
| 408 if (params == null) { | 411 if (params == null) { |
| 409 params = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_P ARENT, height); | 412 params = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_P ARENT, height); |
| 410 } else { | 413 } else { |
| 411 if (params.height == height) return; | 414 if (params.height == height) return; |
| 412 params.height = height; | 415 params.height = height; |
| 413 } | 416 } |
| 414 setLayoutParams(params); | 417 setLayoutParams(params); |
| 415 } | 418 } |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 563 private void cancelRunningAnimation() { | 566 private void cancelRunningAnimation() { |
| 564 if (mActiveAnimation != null && mActiveAnimation.isRunning()) mActiveAni mation.cancel(); | 567 if (mActiveAnimation != null && mActiveAnimation.isRunning()) mActiveAni mation.cancel(); |
| 565 | 568 |
| 566 mActiveAnimation = null; | 569 mActiveAnimation = null; |
| 567 } | 570 } |
| 568 | 571 |
| 569 private void notifyTabUpdated(Tab tab) { | 572 private void notifyTabUpdated(Tab tab) { |
| 570 if (mListener != null) mListener.tabChanged(tab.getId()); | 573 if (mListener != null) mListener.tabChanged(tab.getId()); |
| 571 } | 574 } |
| 572 } | 575 } |
| OLD | NEW |