Allow developers to set different content insets on toolbars and
action bars to be used when navigation buttons or menu actions are
present. Set the default values for these according to the material
spec.
Bug 19317855
Change-Id: I13e04e1f19f0982bf551a3027eb70904d6b4674c
Removes mPopupWidth/Height, which have been moved entirely into the
width and height of the LayoutParams.
Bug: 27878812
Change-Id: Id9fe99c7d57d5c15c7fe10ea95d97be562301a8e
Add CSS font-feature-settings URL to get/setFontFeatureSettings method
JavaDoc in both TextView and Paint.
Bug: 27857640
Change-Id: I8c20068801032407d493e4f4a15b89dcf35949d2
This CL fixes a bug in ListView where if items are not selectable,
not focusable(in terms of ListView flags) but get focus (because
they can), ListView would not recover the focus properly although
it would make the child visible.
The major issue seems like AbsListView marks data set changed when
the list resizes. It seems like a workaround for some other issue
and the code is from 2009 so instead of changing it, I've decided
to implement a workaround to minimize the potential of breaking
something else.
Bug: 27488391
Change-Id: I5babd00e97bba7cb8cc9cfd0697ef79dfae12b97
- Only move the popup above the anchor when necessary
- Adjust the y position when displaying the popup above the anchor
rather than changing the popup gravity
- Reduce popup height if it's still too large after repositioning
Bug: 27819843
Change-Id: I1ecc235816a61b9431568a34d3116e286e092c11
Passes the width and height into findDropDownPosition() rather than
relying on global state. Ensures that an update is forced if any
aspects of the LayoutParams are changed during drop down position
computetion. Cleans up method and argument naming.
Bug: 27819843
Change-Id: Id85e2a0e81e0ea6a754dadf7c1d1c2493a5979b0
This CL fixes a common bug in framework's widgets where they
were not converting a child's margin layout params properly.
The CL fixes, FrameLayout, RelativeLayout, GridLayout and
LinearLayout.
Bug: 27785449
Change-Id: Icecd9181ff82107e412174fe152f35d32d36b2e6
In framework views where we're handling the new visibility aggregated
call we only update the drawable visibility when we're attached to a
window. For old outgoing drawables being replaced, gate this on
whether the drawable is already marked visible instead.
This catches a case where views being inflated might set drawables in
in a superclass constructor and have them replaced in a later
constructor. Gating the call into a drawable that might invoke its
callback (the view being constructed) avoids potential problems where
overridden methods are called unexpectedly on a view subclass that has
not finished running its constructor.
This is a better check than isAttachedToWindow, as isAttachedToWindow
will return false if the view has been temporarily detached from its
parent by a view-recycling container. In those cases, the view would
not correctly update the outgoing drawable.
Bug 27461617
Change-Id: I733a2dd3e3df0a8d80d5dc542ca7b30064159d5d
A point on a direction boundary can be mapped to two offset and
one offset on a direction boundary can be mapped to two points.
Previously, paragraph's primary direction is always used for deciding
offset and coordinates; thus, handle movement around a direction
boundary is often nonintuitive.
With this CL:
1. For selection end handle, direction of character at offset - 1 is
used for deciding handle shape and position.
2. For getting offset from coordinates, previous offset is used to
minimize the offset delta and primary .
3. For getting coordinates form offset, new logic chooses primary or
secondary horizontal coordinate depending on the current run
direction and paragraph direction.
4. When a handle passes another one because it passes a direction
boundary, new logic keeps the handle at the run boundary instead of
minimizing the selection.
Bug: 19199637
Bug: 21480356
Bug: 21649994
Change-Id: I2a7e87ad08416f4bd01a5f68e006240f77d9036b
Ensures that weight is fully (though not necessarily evenly) distributed.
Previously, we could end up with extra undistributed pixels at the end.
Bug: 27690033
Change-Id: If3db83f33145500fa8be006f373c54297733e76f
attachViewToParent is generally used for finishing a temporary detach
of a view as seen in ListView, etc. Have it dispatch aggregated
visibility to the newly added view so as to correctly update the view
as to its new state.
Bug 27702014
Change-Id: Ie8a67c78d3edf401641d52ce10bddf7cb49796fe
Also fixes a bug where the remote input view stays focused
when the inline settings open.
Also prevents sharing from contexts that are not activities,
and prevents text processing when the device is not provisioned.
Bug: 27633360
Change-Id: I8b6e7f661bd873d88e7e2460d043c2aa5f849516
When hint text is used for cursor positioning, the cursor may end up
in opposite direction when the locale and the hint text directions are
different. This CL uses the main text layout and discards the hint
layout while deciding on the position of those three views. The change
also includes fix for cursor and floating popup not displaying for
some cases after the change.
Bug: 22358087
Change-Id: I083d17b06273bc1d9b67656c5e12d4ff1231219c
Change the args for onVisibilityAggregated to a single boolean for
visibility to the user. Also fix an ordering bug that could trigger a
view background drawable call to setVisible before the view would
respond true to verifyDrawable, which caused issues with some apps.
Bug 27461617
Bug 27689884
Change-Id: I58bdc7c4364264f7fa0863689ba2b76df904ef81
There's a common misconception (even across the framework) that
View#onVisibilityChanged determines and reports visibility on 'this'
up to the changed view and the total visibility within the
window. Knowing this is useful for things like starting/stopping
animations. onVisibilityChanged only reports the visibility for the
specific changed view, not the effects that would have down the tree.
Add onVisibilityAggregated to report what some code thought it was
getting already, and move ImageView and ProgressBar over to using it.
Bug 27461617
Change-Id: I433f41de453e27a53f907f1d9805350f30f31de9
Previously, misspelled span is directly used in AddToDicitonary's
OnClickListener. It can crash because misspelled span can have been
updated since SuggestiosPopup is shown.
Also, AddToDictionary didn't work correctly in full screen extracted
mode. Use findEquivalentSuggestionSpan to resolve it.
Bug: 27557526
Change-Id: I51d713dbdd0c44ea2c553164b81b1123a2325aa1
With Ic025c109539c3b5963, selection action mode is created always
when selection is made. It causes distraction in some cases.
This CL fixes this issue. This CL stops starting selection action
mode when action mode is currently not active and not intended to
restart.
Bug: 27536744
Bug: 27551819
Change-Id: I94ee66864000934a21ef0d18c1d71429c67114fa
Drag and drop in full screen extracted mode was disabled by
Ifff4c30919bcb04f7d and re-enabled by I90d8e9f42f395b6b52.
However, related issues have not been fixed. This CL re-disables it.
Bug: 22440907
Change-Id: I753f69e170aa7e79478a5a4a3b89e4a7ef88c9e2
ExtractedText represents a partial text change when
partialStartOffset and partialEndOffset are set.
TextView#setExtractedText handles partial updates correctly when text
is changed, but it didn't handle them for span updates when text is
not changed.
Bug: 27635763
Change-Id: I7dc2ad0c0b7f1867738be3d6d40ea36d0d9a3e7e
Due to I20a86c1bdeb361686, SuggestionsPopup was not shown when there
is a suggestion span that has misspelled flag and doesn't has any
suggestions. This CL makes SuggestionHelper#getSuggestionInfo return
misspelled span info separately.
Bug: 27534987
Change-Id: Ib76588f9388287a04f1f6c9d9067ae439e493a95