This reverts commit 259292ff3d.
This introduced another bug (Bug: 21687602) and this is no longer useful
for the original one (Bug: 21178876).
Change-Id: I59acc161e7d8cba633718a3d17292e68740ef79e
When the RTL properties of a horizontal LinearLayout
changed, nobody enforced the view to be layouted anew,
even though its layout is dependent on the layout
direction. This could lead to stale layouts being
temporarily layouted the wrong way.
Bug: 20495301
Change-Id: I979c8d86ee711626b2901b65ebdf007c1eb1c0fa
This was in a previous change and accidentally got reverted on a rebase.
When going from an Insertion to a Selection/Drag Mode we want to make
sure no insertion modes are started by pending requests.
Previous change with accidental rebase:
I91bcd0d9c3e68d9c736698fe0bec010b4c9f5cf3
Bug: 21647271
Change-Id: I32c152494d236b693a489ea97448904163c9620a
While a useful tactic in previous years, the (int) (float + 0.5f)
trick is inaccurate in some cases. Tradeoffs have changed; do the real
thing now.
Bug 20145160
Change-Id: I8af31bcb1945dc113fd36e094f5970ebd4ec0304
Condition Select All on whether the full text is already selected,
and add/remove this item when needed on ActionMode invalidation.
Bug: 21608943
Change-Id: Iad5f8a77a03b98024f7dcf355b2f7f0d1338b94a
This CL sets the position of EdgeEffect based on whether
clipToPadding is enabled. When enabled, the EdgeEffect will be
bounded to the padding. Otherwise, it will be drawn at the view's
bounds.
Bug: 21595866
Change-Id: I3968e5b8d3a75ce2d7607e2037bc372024694d5b
When we got rid of the paste popup, we merged it into the Selection
ActionMode and moved all its invocations to the ActionMode. Some apps
actually want the paste popup without the Selection ActionMode, hence
separating them again allows them to cancel the one they want.
Bug: 21571422
Change-Id: I91bcd0d9c3e68d9c736698fe0bec010b4c9f5cf3
This CL was a can of worms. More extensive changes are
needed to decouple AdapterView state from measure/layout
passes.
This reverts commit abed07f6c0.
Change-Id: I4e4e01692a1f660a04e9dfd16db882f13c3d0b94
Previously, the selected item data could become inconsistent between a
call to Adapter.notifyDataSetChanged()/Invalidated() and the subsequent
layout pass.
Bug: 21614294
Change-Id: I45c9c98b2f6a8d8b8fb17de2065efa505cbf3c92
The existing implementation started the ActionMode even when knowing
a drag would start. Moved this logic to once the drag is complete,
to avoid the toolbar popping up while the user is still dragging.
Since the existing method selected the initial word when no other
selection existed, refactored that logic so it is also performed at
the start of the drag. Otherwise, the user sees no selection until
he drags over 2 or more words.
Bug: 21144634
Change-Id: I97cf89b1c4c3ebdbbd1af50bd1ce5aa4af72164b
StaticLayout.Builder used "setTextDir" as a shorthand, but it's not
as clear as spelling it out. So, setTextDirection.
Bug: 21572282
Change-Id: Ia94476562d70678f963196b87bb63511d30836b6
Previously this value was only updated when interacting with the
selection handles, so if you started a selection, entered by-char mode,
and then started another selection you would still be in by-char mode.
This resulted in incorrect behavior.
This CL alters the logic to update the handle state whenever the cursor
is placed which will included the initial long press to select a word.
Bug: 21301589
Change-Id: I15dbe6f2b76c7edd8ea4b3ba53e7107c47bc48fa
Fix an incorrect unparceling of the previous saved state in
HorizontalScrollView. Remove an unneeded field in the saved state by
storing scroll offset from start instead of scrollX + isRtl.
Bug 20666194
Change-Id: I1ec45b3e3bd0846b5f659356df7ff94f42e61055
ListView caches transient state views for reuse during layout, which calls
dispatchStartTemporaryDetach() before caching the view. This should always
be followed by a corresponding dispatchFinishTemporaryDetach() before
removing the view from the cache and returning it for reuse. While this
was the case for other types of cached views, we missed this call for
views placed in one of the two transient view caches.
Bug: 17387206
Change-Id: I360945006558b2783c098183a7cc9bc28d05d9ab
Don't try to change focus at all on exit from touch mode. The old
behavior might have been useful for very old apps with a TabHost as
their primary UI, but that's not a modern app structure.
Bug: 21417491
Change-Id: I3db2ab42c90b6c82f23216244a8183c4290eb7d7
Moves themed interface out of Spinner and extends SpinnerAdapter, updates
Spinner constructor to take a Theme rather than a Context.
Does NOT change BaseAdapter to implement ThemedSpinnerAdapter, because
the BaseAdapter class does not have any notion of layout inflation and
that would break the contract implied by ThemedSpinnerAdapter.
Bug: 21571899
Change-Id: Id7e8d630458857ce6c93a6a8b8f920e169ee1152
Not calling mutate here had a side-effect making the icon in the
status bar untintable in SysUI.
Bug: 21566007
Change-Id: Ifb78c81ba7f04d496f14031ef635a6e964e6280e