summaryrefslogtreecommitdiff
path: root/core/java/android/widget/ToggleButton.java
Commit message (Collapse)AuthorAgeFilesLines
* Delay sending accessibility events a little for temporarily detached viewyingleiw2020-07-141-3/+3
| | | | | | | | | | | | | | | | | | | In RV, a view could be temporarily detached in one draw cycle. Accessibility events sent during this time will be lost. To prevent the events from being lost, we will set a flag when a view is detached by parent. And when sending accessibility events for detached view, we will delay it a little by ViewConfiguration.getSendRecurringAccessibilityEventsInterval. This way, if the view is attached in one draw cycle, the events will be sent out. Also add more setStateDescription() in CompoundButton to for safer code. (this is not the cause of this bug though). Fix: 151125936 Test: tested that the bug is fixed. Change-Id: Iffca8c87bad4fa2f66862b966e351562d77d6d76
* Fix setting state description of toggle button and switchyingleiw2019-12-161-0/+3
| | | | | | | | | | | | | | We should set the state description whenever textOn and textOff are updated. Setting it multiple times doesn't hurt because the setStateDescription method won't do anything if the state description is the same. Test: tested with talkback test app. Without the change, a toggle button with textOn and textOff set won't have them announced as the state before a click happens. After the change, a toggle button with textOn and textOff set has them announced as state. Change-Id: Ia1cc6218c8cd0125c123c9b650bb4963825db23a
* change CompoundButton button to use the accessibility state APIyingleiw2019-11-191-0/+20
| | | | | | | Test: tested with updated talkback (see CL/274237446). It works as before. Change-Id: I928350c8bc9112252e8b8a703c465489f03fde11
* Improve widget gettersAshley Rose2019-02-281-0/+2
| | | | | | | | | | | Add range annotations to ToggleButton#getDisableAlpha() and ViewFlipper#getFlipInterval(). Rename AbsListView#getDrawSelectorOnTop() to #isDrawSelectorOnTop() Test: m framework Change-Id: Ieda5b45d10677a9be19a4fc61e8e25d491633428 Fix: 126391791
* Update core widgets to save attribute source info.Aurimas Liutikas2019-02-071-0/+2
| | | | | | Bug: 111439551 Test: make -j Change-Id: I72997a87122f38b32e38e42a690385acc7d0e521
* @InspectableProperty coverage for android.widgetAshley Rose2019-02-041-0/+13
| | | | | | | | | A few getters for view properties have been added where they were missing. CTS tests for the new APIs are pending in b/123894719. Test: m framework Bug: 120492712 Change-Id: I743ce693d384eaf749ced3db7f81bda7d19ed275
* Remove unused imports in frameworks/base.John Spurlock2015-02-281-2/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* First quick implementation of auto assist data.Dianne Hackborn2015-02-061-11/+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-4/+6
| | | | | | | | | | | | | | | 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
* Add View constructor that supplies a default style resourceAlan Viverette2013-09-091-10/+10
| | | | | | | Also updates the constructor of every class that extends View. BUG: 10676369 Change-Id: Ifaf27bf82028d180afa4931c0e906df88d858ac3
* docs: fix a bunch of links from javadocs to api guidesScott Main2012-07-241-2/+2
| | | | | | and add some attributes to Spinner and Switch Change-Id: If015ad000c1a36e19904c132e98ebff1ceaf718b
* Removing checked state description text for accessibility from some widgets.Svetoslav Ganov2012-03-091-10/+0
| | | | | | | | | | | | | 1. The framework was appending some text to convey the state of a a CheckedTextView or a RadioButton or a ToggleButton or a Switch but the checked property already conveys that information. It is responsibility of the screen reader developer to append the state text based on the checked property. This change is requested by a few screen reader developers. bug:5951683 Change-Id: Ieba6797770201155c48e37147ae375dfcb5238aa
* AccessibilityEvent/AccessibilityNodeInfo class name property should be set ↵Svetoslav Ganov2012-01-171-0/+13
| | | | | | | | | | | | | | | 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
* ToggleButton could keep a reference to a previous drawableRomain Guy2011-08-261-0/+2
| | | | Change-Id: Ic19a8e86c61b58926504daf35f0de41358a899b4
* Improving accessibility feedback for two state widgets.Svetoslav Ganov2011-07-291-1/+13
| | | | | | | | | | | | 1. Added population of sensible text for the state of the two state controls such as CheckBox, Switch, etc. This is important since if they are in a layout manager which fires an accessibility event there should be a description of the widget. bug:5092552 Change-Id: Ie3ca955653563496b84db379ae23a23fe88089a8
* docs: add links from widget classes to tutorialsScott Main2010-08-191-0/+3
| | | | Change-Id: I817e885524951853182b0458df4a32dea1614243
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+147
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-147/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+147