summaryrefslogtreecommitdiff
path: root/core/java/android/widget/Scroller.java
Commit message (Collapse)AuthorAgeFilesLines
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-061-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I41e12e425284e74561c6b61663241df364ae54a1
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-211-0/+7
| | | | | | | | | | | | | | | | For packages: android.widget This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: Ic61019b1df85448a158fc2ba55c326353222c6b9
* resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aospNeil Fuller2014-10-021-3/+2
|\ | | | | | | Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
| * Switch from FloatMath -> Math and Math.hypot where possibleNeil Fuller2014-10-011-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation is an API change: FloatMath is going to be deprecated and/or removed. Performance is not the goal of this change. That said... Math is faster than FloatMath with AOT compilation. While making the change, occurances of: {Float}Math.sqrt(x * x + y * y) and {Float}Math.sqrt({Float}Math.pow(x, 2) + {Float}Math.pow(y, 2)) have been replaced with: {(float)} Math.hypot(x, y) Right now there is no runtime intrinsic for hypot so is not faster in all cases for AOT compilation: Math.sqrt(x * x + y * y) is faster than Math.hypot(x, y) with AOT, but all other combinations of FloatMath, use of pow() etc. are slower than hypot(). hypot() has the advantage of being self documenting and could be optimized in future. None of the behavior differences around NaN and rounding appear to be important for the cases looked at: they all assume results and arguments are in range and usually the results are cast to float. Different implementations measured on hammerhead / L: AOT compiled: [FloatMath.hypot(x, y)] benchmark=Hypot_FloatMathHypot} 633.85 ns; σ=0.32 ns @ 3 trials [FloatMath.sqrt(x*x + y*y)] benchmark=Hypot_FloatMathSqrtMult} 684.17 ns; σ=4.83 ns @ 3 trials [FloatMath.sqrt(FloatMath.pow(x, 2) + FloatMath.pow(y, 2))] benchmark=Hypot_FloatMathSqrtPow} 1270.65 ns; σ=12.20 ns @ 6 trials [(float) Math.hypot(x, y)] benchmark=Hypot_MathHypot} 96.80 ns; σ=0.05 ns @ 3 trials [(float) Math.sqrt(x*x + y*y)] benchmark=Hypot_MathSqrtMult} 23.97 ns; σ=0.01 ns @ 3 trials [(float) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))] benchmark=Hypot_MathSqrtPow} 156.19 ns; σ=0.12 ns @ 3 trials Interpreter: benchmark=Hypot_FloatMathHypot} 1180.54 ns; σ=5.13 ns @ 3 trials benchmark=Hypot_FloatMathSqrtMult} 1121.05 ns; σ=3.80 ns @ 3 trials benchmark=Hypot_FloatMathSqrtPow} 3327.14 ns; σ=7.33 ns @ 3 trials benchmark=Hypot_MathHypot} 856.57 ns; σ=1.41 ns @ 3 trials benchmark=Hypot_MathSqrtMult} 1028.92 ns; σ=9.11 ns @ 3 trials benchmark=Hypot_MathSqrtPow} 2539.47 ns; σ=24.44 ns @ 3 trials Bug: https://code.google.com/p/android/issues/detail?id=36199 Change-Id: I06c91f682095e627cb547d60d936ef87941be692
* | Fix Scroller interpolationChet Haase2014-08-061-3/+3
| | | | | | | | | | | | | | | | | | The ViscousFluid interpolator simply returns the input value and not the interpolation of that value. Issue #16815073 Scroller.ViscousFluidInterpolator short circuited Change-Id: Ifa189026c1396a42a2348260a2a54cf0c3caad08
* | Fix the build, use viscous fluid interpolator in OverScrollerAlan Viverette2013-09-041-1/+1
| | | | | | | | Change-Id: I175a220d1d915161896b9b223acfee08e0face2c
* | Move viscous fluid interpolator to its own classAlan Viverette2013-09-041-33/+45
|/ | | | Change-Id: If7dcc968895ba9200b40fbc7d7aded6e6bbf6ff7
* Doc change: Scroller Javadoc Bug # 7966653Katie McCormick2013-02-071-8/+36
| | | | Change-Id: I4365946f890a76fcfa78ca9d69f2a8e0848095a9
* Sync fling physics between Scroller/OverScrollerAdam Powell2012-08-091-25/+76
| | | | | | | | | | | | Bug 6793537 Have the default fling physics for Scroller follow the newer patterns from OverScroller. Make some constants determined by DisplayMetrics density in OverScroller per-instance rather than static. Change-Id: I5308e4bb8eca63e95cf3f1eee1ba4fa5391023b0
* Make EdgeEffect public API.Adam Powell2011-08-311-1/+0
| | | | | | | | | | | This enables apps to make use of the system's visual edge effect used during overscroll in 2D content. Also un-@hide the getCurrVelocity methods from Scroller/OverScroller, without which it becomes cumbersome to obtain values to pass to the EdgeEffect#onAbsorb method. Change-Id: I40e452455f5cb5d45d1fb3687f739fc8eae65560
* Merge overscrolling from gingerbread.Adam Powell2010-11-231-20/+24
| | | | Change-Id: I3eb4413261b38ddd8c609d6153bdfd4ae46c6a0f
* New spline physics for list fling motion.Gilles Debunne2010-11-171-2/+1
| | | | Change-Id: I72216acb29f1cd475682141701e1f2e56f52d527
* Changes to scrolling physicsGilles Debunne2010-11-171-16/+85
| | | | | | | | Spline curve for Scroller fling motion (debunne) Flywheel motion for AbsListView Change-Id: Ic1f226878745ff4c302dc6bd0752868fa182dd7b
* Actually store the newly computed deceleration.Romain Guy2010-10-121-1/+1
| | | | Change-Id: Ib62470187ec7709340f04842748b9d8cb88ee0c2
* Add an API to control AbsListView's friction.Romain Guy2010-10-111-6/+22
| | | | Change-Id: Iafb08cd28703d282c369c472a5d85a22cc5dacb7
* Fix a bug that could cause flings to last too long using a ScrollerAdam Powell2010-07-281-1/+5
| | | | | | Bug 2866552 Change-Id: I6979b3da54ca2aeaf4583629e28ee81fa5bd70da
* Fix bug 2639949 - Don't stop a Scroller earlyAdam Powell2010-04-281-7/+0
| | | | Change-Id: Ia827199a27d03289b6fa573dd6f2b13517943400
* Remove overscrollingAdam Powell2010-03-291-297/+190
| | | | Change-Id: I7e9db8d8a9b8ef67f0c0c82bf57c9155b7ebabea
* API refactoring for OverScroller.Adam Powell2010-03-251-13/+9
| | | | | | | | | OverScroller is no longer a child class of Scroller and several Scroller methods that do not make sense for OverScroller and could cause misbehaving edge cases have been removed or hidden and deprecated. Change-Id: Ie055b607bd3b36c47ab9798d5c9518aef686b474
* New edge effect when OverScrolled.Gilles Debunne2010-03-231-1/+1
| | | | | | | | | The constant force that was applied has been replaced by a spring force when the OverScroller goes beyond valid position values. Bounce coefficient can be set for each directions. Change-Id: If7d506d3f35b3451f590c54d6c04a1deb8d9ca95
* New OverScroller with edge bouncing effect.Gilles Debunne2010-03-191-196/+307
| | | | | | | | | OverScroller has been made a Scroller child class. Both use a physical constant deceleration force to compute the animation. OverScroller also includes a rubber edge bounce effect. Approved by Jim Palmer. Change-Id: I3f43a03694b8cb6bfa0784c2663b37c9c39322cc
* accelerate consecutive flingsCary Clark2009-09-011-0/+11
| | | | | | | | | | | | | | | Use the fact that the scroller keeps track of the current velocity to accelerate subsequent flings. The current velocity is added to the new velocity if the flings are in the same general direction and if the fling animation hasn't been aborted. This makes it easier to move to the top or bottom of very large pages (either in overview mode or reading mode) by taking consecutive flings as a cue from the user that they want to page faster. The user can stop the fling with any action as before. fixes http://b/issue?id=2066090
* The comment lack of symbol # and parameter data type. This will cause ↵djken2009-07-071-1/+1
| | | | compilation failed.
* Add of Javadoc comments on undocumented methods.Cyril Mottier2009-07-071-9/+35
| | | | Use of a constant defined in SensorManager for computing deceleration.
* AI 145994: Integrate #145778 from Donut.Dianne Hackborn2009-04-131-2/+0
| | | | Automated import of CL 145994
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+388
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-388/+0
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-0/+20
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+368