summaryrefslogtreecommitdiff
path: root/core/java/android/widget/StackView.java
Commit message (Collapse)AuthorAgeFilesLines
* add directional accessibility page actions to StackViewyingleiw2019-07-311-11/+47
| | | | | | | | | | | | | | | | StackView has ITEMS_SLIDE_UP mode and ITEMS_SLIDE_DOWN mode. In ITEMS_SLIDE_UP mode, scroll forward is slide up and all pages go up (page down action), scroll backward is slide down and all pages go down (page up action). In ITEMS_SLIDE_DOWN mode, it is the opposite. A video in ITEMS_SLIDE_UP MODE is here: https://drive.google.com/file/d/1m5awAP7ja8tqSaSvNM_oDoVbaUeCa3l6/view?usp=sharing Test: Tested with twisted talkback that in ITEMS_SLIDE_DOWN mode, page down action is equivalent to scroll backward, and page up is equivalent to scroll forward. Bug: 136277517 Change-Id: I52b2af231781fa04cec5815db2e573a9014e434b
* Update core widgets to save attribute source info.Aurimas Liutikas2019-02-071-0/+2
| | | | | | Bug: 111439551 Test: make -j Change-Id: I72997a87122f38b32e38e42a690385acc7d0e521
* Temporarily allow StackView to use a canvas.clipRectUnionDerek Sollenberger2018-04-181-3/+2
| | | | | | | | | | | | StackView currently expands the clip of the view which is a prohibited operation in API Level 28. This CL currently allows this specialized use case to work in this situation until we can update StackView to not clip to its bounds and then just intersect with this clip provided by its parent. Test: CtsWidgetTestCases Bug: 77642155 Change-Id: Icc003ad3946bb226368ec2030d4707753f4f55e9
* Add safety net if StackView duration would be negative.Tony Wickham2016-11-071-0/+5
| | | | | Bug: 32699754 Change-Id: I00d4b2398fa7f4ab4cdad290a346b0f09c2af242
* Fix import statements in android.widget package.Aurimas Liutikas2016-10-111-8/+8
| | | | | | | Additionally this CL removes spaces at the end of the line. Test: code still compiles. Change-Id: I1ce98b4e70aa3ae614f87966c3bc6181fa4389a4
* Remove unused imports in frameworks/base.John Spurlock2015-02-281-1/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* First quick implementation of auto assist data.Dianne Hackborn2015-02-061-5/+2
| | | | | | | | | | | | | | Introduce new AssistData class that contains all data the framework automatically generates for assist. Currently populated with a very simple tree structure representing the app's view hierarchy. Reworked how we populate the class name for accessibility info, so this is provided through a new method call on View that subclasses can override. This method is also used to populate the class name in AssistData. Change-Id: Ibd0acdc8354727d4291473283b5e4b70894905dc
* Fix accessibility delegationAlan Viverette2015-01-071-6/+9
| | | | | | | | | | | | | | | Ensures that delegate code is run last. Previously, calling the super method from an accessibility delegate set on a widget would only run code in the widget's parent. Next, the delegate code would run. Finally, the widget's code would run. As a result, the widget code would override any data supplied by the delegate. By moving all overridden code to internal methods, we ensure that the call chain for super includes the widget's parent code followed by the widget's code. The delegate code will always run last. BUG: 17641433 Change-Id: Ib9d403156c1fc4fb04f65f3c126d1277a44b3740
* resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aospNeil Fuller2014-10-021-4/+2
|\ | | | | | | Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
| * Switch from FloatMath -> Math and Math.hypot where possibleNeil Fuller2014-10-011-4/+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
* | Add View constructor that supplies a default style resourceAlan Viverette2013-09-091-3/+10
|/ | | | | | | Also updates the constructor of every class that extends View. BUG: 10676369 Change-Id: Ifaf27bf82028d180afa4931c0e906df88d858ac3
* We can now (kind-of) change screen density on the fly.Dianne Hackborn2012-08-031-2/+2
| | | | | | | | | | | | | | | | | | | | | Preloaded drawables now have a density associated with them, so we can load the correct drawable if we are using a different density. Window manager now formally keeps track of the density for each screen, allowing it to be overridden like you can already do with size, and relies on this density to drive itself internally and the configurations it reports. There are a new set of Bitmap constructors where you provide a DisplayMetrics so they can be constructed with the correct density. (This will be for when you can have different windows in the same app running at different densities.) ActivityThread now watches for density changes, and pushes them to the DENSITY_DEVICE and Bitmap global density values for that process. A new am command allows you to change the density.
* Exposing some accessiblity actions only for enabled views.Svetoslav Ganov2012-05-161-5/+10
| | | | | | | | | 1. Some accessibility actions should not be performed on disabled views. For example, scrolling should not be permitted while accessibility focus should be. Made a quick pass over the actions we expose now. Change-Id: I36626dfbc0d2f480309a910f58f1de64e9e05675
* Add accessibility scroll support to some widgets.Svetoslav Ganov2012-05-151-0/+30
| | | | | | | | | | | | | 1. Added support for accessibility scroll action to some widgets that are scrollable. 2. Making the super call when handling an accessibility action in the views to call super first to allow an accessibility delegate to intercept the call. bug:5932640 Change-Id: I5eb37d64bf9fba1d5c596981132e0df717e2a18a
* Revert "Adding getters/setters for StackView xml attrs. (Bug 6104219)"Winson Chung2012-05-011-40/+0
| | | This reverts commit 7ced8f9cabfed2e11c125a1a6b4ff18f1cc50060
* Adding getters/setters for StackView xml attrs. (Bug 6104219)Winson Chung2012-04-301-0/+40
| | | | Change-Id: Iaa1ba0292b0d40f73e315028d9f01ef407021e57
* AccessibilityEvent/AccessibilityNodeInfo class name property should be set ↵Svetoslav Ganov2012-01-171-0/+14
| | | | | | | | | | | | | | | to only framework classes. AccessibilityEvent and AccessibilityNodeInfo have a property className which is set to the source Java class. This is problematic since leads to leaking private classes which would allow an accessibility service to load classes from other packages. This is strongly undesirable since not trusted code can be loaded, and hence executed, in the accessibility service. To address that the class name is set to the most concrete framework class extended by the info/event source. bug:5878943 Change-Id: I7b3114ece8772ea2773f5151e21b8a6f2006882a
* Removing fades on last item in StackView for major FPS improvement on PrimeAdam Cohen2011-10-211-39/+6
| | | | Change-Id: I479eb129e80a6087ab55d1de7eed0222d6dacdf6
* Updating javadoc for StackView constructors (4554433)Winson Chung2011-09-061-0/+9
| | | | Change-Id: I084c9535f9be4ae4e3942828d3b624d28eae4b06
* Clear the bitmap from the canvas in a lot of places.Dianne Hackborn2011-08-021-0/+2
| | | | Change-Id: I6b2071ac7b348c473b9bdd1b972d095aebbb4fb3
* Code cleanup.Romain Guy2011-05-251-5/+2
| | | | Change-Id: Ie7685b14e3eb81a2e1034004c3ba04b523e9dd13
* Fixing AdapterViewAnimator onItemClick compatibilityAdam Cohen2011-04-061-2/+2
| | | | Change-Id: I7b7c37370d0afdc23c62534ea41ffedc8f96f8ff
* Making StackView res-out and click feedback colors stylableAdam Cohen2011-04-011-11/+29
| | | | Change-Id: Ia6241b1b66dc510b22bcf342d775f98eb7c86871
* Fixing inconsistency between invalidate region and draw regionAdam Cohen2011-03-081-5/+17
| | | | Change-Id: I84458b31b4d3e8c305d64eb25e352fc4aba933d0
* Adding mouse scroll wheel support to StackViewAdam Cohen2011-03-011-0/+36
| | | | Change-Id: I8ae5039606b3080059cea579547f6c61586641e3
* StackView rendering fix for non-hardware accelerated apps and hardware layersAdam Cohen2011-02-161-2/+4
| | | | Change-Id: I34a0362cd37c6b95a0b3196302b6510b0f7ad34e
* Fixing static StackView scenario (Issue: 3399844)Adam Cohen2011-01-271-2/+6
| | | | Change-Id: Ic1e700f7b4071f6ae86912cf5f12828e3f68f412
* Fixing some ugly StackView relayouts on rotationAdam Cohen2011-01-261-11/+4
| | | | Change-Id: Ic4b11637ed73e60e1af1fcd27e5610d8f84a31fe
* Cleaning up StackViewAdam Cohen2011-01-251-53/+139
| | | | Change-Id: I38cd8a5f2d25973d3f97551be0a873ca35044ed9
* Fixing a couple StackView bugs:Adam Cohen2011-01-211-2/+6
| | | | | | | -> Making sure to update visuals every time adapter count changes -> Fixing a clipping issue seen on some devices Change-Id: I489395b5caaa06eb7187b2dac679b793bf54d7e1
* Cleaning up some StackView bad behaviorAdam Cohen2011-01-201-33/+7
| | | | | | -> Issue: 3363564, 3320865 Change-Id: I32215478006a689f543532af4ce2267ccbb7fa56
* Addressing API Review docs bugs:Adam Cohen2011-01-201-0/+15
| | | | | | | | | ->Issue 3370313 ->Issue 3370403 ->Issue 3370328 ->kthx, bye Change-Id: I2d1962c27b3ba856a0b4632d335271300bab45eb
* Fixing StackView bug (Issue: 3321912)Adam Cohen2011-01-161-5/+2
| | | | Change-Id: I3a0e898e53a44146f1970479573880609f545799
* Fixing StackView bugs:Adam Cohen2011-01-161-15/+31
| | | | | | | -> Single item in loop mode (Issue: 3290092) -> ITEMS_SLIDE_UP compatibility (Issue: 3134989) Change-Id: I7fb662c388bfa57c7837a8a5225d33d839aed404
* Fixing StackView rotation bugsAdam Cohen2011-01-141-26/+51
| | | | Change-Id: Iaf9482734ca73238f82d180700389593df9c7eac
* Fixing bug where StackView doesn't clip it's children correctlyAdam Cohen2011-01-101-0/+12
| | | | Change-Id: Icb051fa355c5c1b92f81d56f04efd4f8699c65a4
* Fixing leak in StackViewAdam Cohen2010-12-171-6/+20
| | | | Change-Id: I2a5f340906c38f87a4b280bedcd47624351da467
* Changing StackView layout to space items differentlyAdam Cohen2010-12-161-22/+74
| | | | Change-Id: Ia46d28312321b338b4a3aec1df9fa00c645f5b73
* Fix in StackView layoutAdam Cohen2010-12-151-1/+1
| | | | Change-Id: I09d9cf52a8301bad78754c7e00f2fd0c6c050045
* New stack visualizationAdam Cohen2010-12-141-37/+55
| | | | Change-Id: I0c479f92a3682dfb917e00935365dd3e99456daf
* Preventing StackView auto-advance during / near interactionAdam Cohen2010-12-031-0/+13
| | | | Change-Id: Ieea5492933b87f1eb30703a23c90f53869f92c20
* Implement smarter sizing of WRAP_CONTENT windows.Dianne Hackborn2010-12-031-9/+25
| | | | | | | | | | | | | | This extends the view hierarchy's measure pass to allow view to propagate up to their parent additional information besides just their measured size. They can now report that their measured width and/or height should be larger than the size their parent is limiting them to (even though by definition they need to contrain their reported measurements to the limits imposed by the parent). ViewRoot uses this information to determine if it should remeasure the window with a larger size limit to try to make it fit. Change-Id: I90af3b7a8ec45d0a5c003fb009857025209d83eb
* Fixing issue #3200503Adam Cohen2010-11-181-1/+1
| | | | | | -StackView was using the wrong view to draw the click feedback Change-Id: Ibb0a24af2d740fd1e3f6a6345518d730b66673f4
* Reduce amount of garbage created when flipping StackViewsPatrick Dubroy2010-11-161-17/+22
|
* Adding click feedback to StackViewAdam Cohen2010-11-121-3/+52
| | | | Change-Id: If163d144c96607c53299877e5d99747530c281fe
* -Prevent StackView from advancing while interacting with itAdam Cohen2010-11-121-36/+35
| | | | | -Fixed null pointer exception Change-Id: I294a0d055de51573d79219ef469c8df6ab04a297
* Adding widget auto-advance capabilityAdam Cohen2010-11-101-0/+3
| | | | Change-Id: I058573f40a48fd7b5c2efa5f1041a1199919a51a
* Adding click feedback to widget collectionsAdam Cohen2010-11-011-0/+3
| | | | Change-Id: I97fceb6c68ca6eb1b703eafacf201e1aed7c38e7
* - Made showNext() and showPrevious() on StackView remotableAdam Cohen2010-10-261-14/+53
| | | | | | | - Made StackView show the transition when showNext() or showPrevious() is called Change-Id: Id6e3e6d9ff374c037323f77d247f1a1e4398009e
* -> Fixing a bug where AdapterViewAnimator doesn't refresh correctlyAdam Cohen2010-10-251-1/+6
| | | | | -> Reduced swipe threshold for StackView Change-Id: I0f04f45dade57f29581fe03fb195a6db5f12adb1