Previously we'd return true from onIntercept and assume the DOWN event
was handled, then onTouch would return false and the host view would
receive the DOWN event. Now we consume the event in onTouch.
Bug: 19080751
Change-Id: I1bd35b4c25a0760f4248ade443d09b8ca4b71e7c
This is a follow up CL for Ia515fc576ddf2127b2f9863cc2652aeb619fff6e
for Bug 5420741, which had basically the same goal to Bug 20158984.
The goal here is to dismiss any popup window opened by the TextView
when the device is about to be rotated. This is important because
Window Manager and Input Method Manager Service are really sensitive
about which window is focused before and after the device is rotated.
In Ia515fc576ddf2127b2f9863cc2652aeb619fff6e, we tried to distinguish
two kinds of focus-lost. One is the true focus lost where suggestions
pop-up (if any) should be dismissed, and the other is an side effect
of showing the suggestions pop-up itself. We have used isShowingUp()
to distinguish distinguish one from the other. In short, it
indicates whether onWindowFocusChanged() is not called yet or is
called at least once.
In extract edit mode, however, it turned out that
onWindowFocusChanged() is never called (at least in recent builds).
As a result, the popup window is not dismissed when it should be.
One of the smallest solution would checking isShowingUp() only when
the target TextView is not ExtractEditText.
Adding unit test would be handled as Issue #20703391.
BUG: 5420741
BUG: 20158984
BUG: 20703391
Change-Id: I1706cf2ea0b0bdfe8894ab57fc3caa8ff12d8aab
Moves the queryHint to defaultQueryHint, specifies the override order
as queryHint > SearchableInfo > defaultQueryHint.
Cleans up annotations and comments for several related methods.
Bug: 20614122
Change-Id: Ib58ec309e6814cd512df147d789ec0cd546018af
Day validation moved from the PagerAdapter to the DayPickerView,
which is widget that actually handles the touch interaction and
disabled state for individual days.
Fixed disabled states for primary and secondary activated text
colors. Replaced old light/dark color state lists with themed
versions.
Removed conflicting view visibility changes for managing next and
previous arrows in DayPickerView.
Bug: 20630417
Bug: 20641013
Bug: 20641879
Change-Id: Icdaf02a3b57ec162169c31b8a27ebea908552321
NOTE: This is only done on ACTION_UP event since the toolbar is
going to be hidden while one is dragging the handles.
Change-Id: Id09fc076edb0117ebceb26395ac91ee4d2283c2d
Selection handles were always shown when selection action
mode is started at first time. When the action mode is
started without a selection, only insertion handle must be
shown.
Bug: 20264980
Bug: 20407551
Change-Id: I630804e007f795d28f87e3fa6cba0de5bf588c78
HandleView#isVisible didn't use getHorizontalOffset; thus,
the position is always computed as if Gravity.LEFT is set.
As a result, isVisible can be wrongly false for the end
handle and the handle is dismissed.
Bug: 20480054
Change-Id: Ib3242000bb98ae28e0cb37bf5b05069754abbfc6
-> If connection to the service fails for whatever reason,
mNotifyDataSetChangedAfterOnServiceConnected can get stuck to true, preventing
future connections to the service. Don't let this prevent from connecting to the
service.
issue 19890339
Change-Id: I376101ae146359109df53add3a3202ba2e1e842d
When an acitvity with ZoomButtonsController is destorying all
its views are removed immediately except for the
ZoomButtonController view which is deferred. This causing the
system to think the window was leaked at the end of the current
clean-up pass since the view is still around. We now remove
the view immediately when setVisible(false) is called which is
the current signal that the window is detaching or the parent
view is now hidden.
Bug: 18280446
Change-Id: If566b402c2914a72539e28e4f6d768c6199f2d2f
Changes the behaviour of onKeyDown for DPAD_LEFT/RIGHT when the
layoutDirection is RTL, to move the focus in the correct direction.
Change-Id: I889649788d1e6f347aed90d6683d9f4dd6807da0
This blocks showing "SELECT ALL" in FloatingToolBar when
the input is empty or the field is a password field.
Bug: 20407551
Change-Id: Ia25700bbee4f78445776af46eb1369af6600d946
In the old logic, vertical selection shrink is detected
when the offset decreases and line number of the end handle
position increases. This never happens.
Bug: 20482453
Change-Id: I9e51742fcab4abe939f72130c51be773818aec62
Lays out ViewPager in the opposite direction when in RTL mode, e.g.
the first item's starting edge is laid out at the largest possible
scrolling distance. This preserves both the meaning of positive
scrollX values and the meaning of positive adapter positions.
Also removes clickable attribute from DayPickerView since it has a
virtual view hierarchy.
Bug: 19408740
Bug: 20134073
Change-Id: Ib6f945335bd88da59c8c593c7c270e290e15d0a5
Currently, "Replace" is shown when any spans intersects
the selection. It causes confusing behavior when multiple
words are selected. "Replace" is in the ActionBar, but it's
unclear which word will be replaced. It can happen when
text is selected using long tap + drag, unig keyboard, or
using a mouse.
Bug: 19396964
Change-Id: I512f5f566d4060cd0aa7b28594054bf4f6bf7458
Hand-waves the default interpolators for efficiency's sake until we can
implement interpolator caching or preloading.
Change-Id: Ibc618a0c092b08a33fb91265ec15665c94831b6b
In support of layout of paragraphs to non-rectangular regions, add
arrays for left and right indents to TextView, along with supporting
StaticLayout builder setters.
Bug: 20182243
Change-Id: I015bcef8f258c89001fcf8a54c179d2dfc0d7943
TextView.extractText crashes when null argument(s) is given. This patch
adds a null-check and prevents the crash.
Bug: 5762732
Change-Id: I945b6cde77f30cb5ee2944797732ec69890711bf
The gesture is: stylus touching screen + button pressed, the event
is recognized when the button is pressed, not when it's released.
It can be pressed during DOWN or MOVE.
Bug: 19620479
Change-Id: I4ce2cea4eb058e308ba88ef3dd3bed278bdca555