Using the same method as getBoundsInScreen.
Bug: 35095925
Test: Manually verified location with test app, ran a11y cts
Change-Id: I1eee2a4eb23912698be61c9030d92bbade1d743a
classifyText() is used to generate a menu item in the selection toolbar
to handle the selected text. In this cl we avoid calling classifyText()
when the selection is changing but instead call it when we are about to
show the toolbar.
Previously, we depended on invalidateActionModeAsync() to classify text
after a call to startActionMode(). Now that we've introduced
invalidateActionMode() we need to be able to tell
startSelectionActionMode() that we also want the text to be classified,
hence the introduction of an input parameter, "adjustSelection", to
startSelectionActionModeAysnc().
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Bug: 34966796
Change-Id: I5b9fc9e8ab443f024f8ca461df5a4bcc6485d26b
This reverts commit 358d0d3297.
This CL resulted in b/37933333 regression, so it'll have to re-land with a target API check.
Change-Id: I1c2e4de43a15c1851d98f6aff432585ada80fb5b
- Sending scroll events for accessibility.
- Sending text update events when state changes.
- Blocking text updates during fling to reduce number of events.
- Making widget focusable by default, which keeps focus from
moving to the rest of the UI when the text box becomes invisible.
- Managing visibility of the text box alongside IME state, so the
IME won't decide to display the password keyboard during a fling.
Bug: 21494380
Bug: 37016501
Test: Ran NumberPicker CTS
Change-Id: I459d37d4a54c91e1cb5c7ec68fe0f012b25fb740
Currently VideoView.onTouchEvent and VideoView.onTrackballEvent do not
call super. This completely disables several useful View features
such as long click, context menu or tooltips.
Bug: 37755662
Test: manual
Change-Id: I0c82c32da36e4ca7cacc78027daed2fa298a6b58
Previously ListView#addHeaderView and ListView#addFooterView accepts a
view which is other's child.
The CL adds precondition check not to accept other's child and make the
methods consistent with ViewGroup#addView.
Bug: 37726743
Test: CtsWidgetTestCases
Change-Id: Ibe11f162e9af3c153254966796349b94468b08f3
Use IllegalArgumentException instead.
Bug: 37769084
Bug: 37765945
Test: am instrument -w -e class android.widget.cts.TextViewTest
android.widget.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.TypefaceTest
android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.PaintTest
android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.FontVariationAxisTest
android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.text.VariationParserTest
com.android.frameworks.coretests/\
android.support.test.runner.AndroidJUnitRunner
Change-Id: I50b70e3e7e37585c937dcce2416a83353de62a5d
When the context is restricted, avoid loading custom fonts in
layouts. This is currently only done by TextView. Loading
system fonts via their string name is still OK, just not by
resource id.
Test: cts attached in topic
Bug: 35763094, 31218679
Change-Id: I0dc3a3eade0439c503c58a582b083d7ba1dd4aa3
Autofill manager service was not observing package changes thus
we did not properly handle the cases of the service being updated,
added, and removed. Handling, additions is needed to properly
support restore from a backup. Fixed a few missing locks.
Test: all autofill CTS tests pass and manually tested update, add,
and remove of autofill services.
bug:36638606
bug:36978445
Change-Id: Idd47891774ba2a4e562a1952cbb5a048211fd4e3
In ag/969570 we've unified the treatment of divider logic
in LinearLayout. However, setDividerDrawable logic that was
calling setWillNotDraw added condition that the divider
position is not NONE. That made the initial flow effectively
not calling setWillNotDraw(false).
Changing the order to call setDividerDrawable() at the end
invokes the right logic.
Test: adb shell am instrument -e class 'android.widget.cts.LinearLayoutTest' -w 'android.widget.cts/android.support.test.runner.AndroidJUnitRunner'
Bug: 37698004
Change-Id: I8d95770b9f48277c402708fbc5279ba2ec56719f
- reworded introduction for clarity
- crosslink to nestedscrollview
- simplify language around the “don’ts”
- crosslink to the material design guidelines for scrolling techniques
Test: docs only change. Tested with doc build
Change-Id: Ia6d1e5ce0f9abd3db2c1988537bd42013851596f
Updated top-level description to:
- favor explanations of using XML for setting attributes (instead of using
methods like setGravity()
- add code example
- clarify what "child view" means
- add context around cross-link to layout params
- add context around cross-link Linear Layout guide (this guide focuses on
layout_weight)
Test: docs change only. Tested with doc build
Change-Id: Ifc1fa4cf24e2afa229f1c20b3f725073aff162d7
- link to material design guidelines for a visual example of
determinate/indeterminate patterns
- reword introduction for clarity
- remove confusing code example, in favor of a concise explanation of
determinate/indeterminate uses
- adds a note about not using progress bar in a dialog
Test: docs change only. Tested with a docs build
Change-Id: I872f7a647eafa6d0f1652549ad2d9d2db4fc81e3
Added changes to make purpose/usage of RelativeLayout.LayoutParams more
clear:
- clarify the attributes are set on a view contained in a relative layout
- clarify that relative layout uses these values to position the view
- add note that these values are ignored if view is not contained in a
relative layout
- cross-link code sample in Relative Layout guide
- cross-link guide Layout guide to clarify layout params vs regular
attributes
Test: docs change only. Tested with a docs test build.
Change-Id: I4fe1088594c998cee4ff0b2f6295579956c19d6f
rework the edit text introduction and overview.
- adds an example of a basic configuration
- discuss the inputType attribute
- cross link to relevant classes & methods
- Rework the edit text introduction and overview
- wrap guide link in a p to emphasize
- emphasize specifying the inputType is required
Test: docs only change. Verified with doc test build
Change-Id: I78d8c861c51117bfd61e8c37ad83854a2aeec967
So far that was done indirectly by public methods that could
be overridden in away that does not set the proper id in the structure,
which would crash apps.
Bug: 36171235
Test: modified VirtualContainerActivityTest#testAutofillOverrideDispatchprovideAutofillStructure
Change-Id: I3f1c64020125cbb8349971a0bc52ccd1e0c81e62
- Simplify first-line description
- Update top-level code sample
- Add caveat about onClick running on main thread
- Simplify button style discussion
- Add distinct See Also section
- Convert future tense to present tense
- Add closing paragraph tags
- Remove references to push-button
- Clean up code introduction sentence
- Use present tense
- Connect reasoning to user experience
- Format threading information as aside
- Change future tense to present tense
- Add transition statement
- Use active language in parameter description
- Use cannot instead of can not
- Use common parlance name for button
- Clean up parameter descriptions
Test: Docs change only. Tested with a doc build run.
Change-Id: Ie0cd25ed4f8372ba5ec58bdf8b7dfce9100ee3fc