When adjusting the popup's layout param to clip it to screen, we
have to convert x, y into screen coords to make any comparision
to the display frame, which is in screen coords.
bug: 25346252
Change-Id: I996286dec83ef2a1782dd2a66435eab45abf1bae
Allows us to differentiate between child windows that always want to be
laid-out in the parent frame regardless of multi-windowing mode
(PopupWindows) and those that don't (SurfaceViews).
Bug: 26255254
Change-Id: Icbc245a24f9a38698444196846ddb25016ef7e2a
Also adds final where the method was being called, adds Nullable
annotation to method, and updates docs.
Bug: 25985497
Change-Id: I847a8507f2e3970f1340cddf4abf8650dda22b35
- Construct context menu in #onCreateContextMenu.
- Ignore non-primary buttons for selection.
- Don't open context menu on long click.
Bug: 19544351
Bug: 19397276
Bug: 24872170
Change-Id: I4690e1485682be4f9b504b8fb6af936b979f13b8
By default space should "click" the focused item. This behavior also
applies to GridView and ListView if the items are clickable, but will
continue the previous behavior of scrolling if it's just a list of
items you can't really interact with.
Change-Id: Ic3a0334614d1dc68ff98bc4b1fb1ae2f961f71af
In preparation for supporting replacement of child windows
we make replacement per window rather than per app.
Bug: 26070641
Change-Id: Ifa332086599c125611e430219c9497bae7e2ce31
The logic was in TextView, but it's only for Editor.
Move it to Editor and have constants for the state.
Bug: 19544351
Change-Id: I391f66753aa5cbb26fbefcba5b4e7e3d917454e2
- Detect triple click in TextView#onTouchEvent.
- Select paragraph on triple click.
- Extend drag accelerator to support paragraph based
selection.
Bug: 19544351
Change-Id: I0a6752a0642a2c569b69a1fc2c0f49169a72844a
Now, the handles will be shown at the proper positions in
Editor#startSelectionActionMode. No need to call
HandleView#showAtLocation.
Change-Id: I5a7fb7bc4419a49234584bd06db5acc3d23168b8
- Remove mouse selection related logic from
ArrowKeyMovementMethod and Touch.
- Extend drag accelerator to support character based
selection by dragging and use it for mouse drag selection.
- Enable word based drag accelerator even if the clicked
position is not on a word.
- Disable y-coordinate adjustment for word based drag
accelerator when the user is using a mouse.
Bug: 19544351
Change-Id: I1b29a65be3d321ac472f8c5b70ab6fee4e895964
This reverts commit c55d5072ac.
There were several bugs related to incorrect handling of various
layout issues (layout not being run on containers/views that needed
it), reverting to take another run at it outside of master.
Issue #25980198 requestLayout() sometimes doesn't result in measure/layout for view
Change-Id: Ic0e159cbcf6171652d8fd1bee9ae44a3977cea04
Previously it would snap to the floor(progress) tick, which makes the
touch target size for the last tick 0px wide and difficult to touch.
Change-Id: Iac488d73e5a67c29b45f9bb4368db46c0028483e
A bug in recent layout optimizations was causing the framework to avoid
laying out containers with WRAP_CONTENT in one axis or the other.
This fix updates the logic in the code that finds dependent layout axes
to correctly account for this case.
Issue #25980198 requestLayout() sometimes doesn't result in measure/layout for view
Change-Id: Ie5f678beef5d8c4ba25291ffdcd59797d4697acc
The reason that manifests is because SV's
onInterceptTouchEvent checks if it's scroller.isFinished()
returns true. The result of Scroller.isFinished() is only
valid if it has had computeScrollOffset() called on it before.
ScrollView currently posts a invalidation after a computeScroll()
call, which means that isFinished() *should* be valid, but it's
better to be explicit which CL adds.
BUG: 26051101
Change-Id: If78f48dc855de1776011cb7b0f95cb0a80d9b777
This is the 2nd try of I39dc0c310158ad23ba6c987efce07deaf30ce693.
This is a mechanical refactoring with no behavior change.
With this CL, InputMethodSubtype and SpellCheckerSubtype have the same
getLocaleObject() hidden API, which makes it easy to share the logic in
subsequent CLs.
No behavior change is intended.
Bug: 11736916
Bug: 20696126
Bug: 22858221
Change-Id: I51be014c752b736a808e2b0d56e664941a218a2f
This is a mechanical refactoring with no behavior change.
With this CL, InputMethodSubtype and SpellCheckerSubtype have the same
getLocaleObject() hidden API, which makes it easy to share the logic in
subsequent CLs.
Bug: 11736916
Bug: 20696126
Bug: 22858221
Change-Id: I39dc0c310158ad23ba6c987efce07deaf30ce693
The primary goal of this CL is to enable application developers to
provide more context-based language (locale) information for IME
developers so that users can be benefited by more natural text input
experience.
As of API Level 23, there are several APIs that allow IMEs to retrieve
locale/country related information.
- Locale#getDefault()
- Configuration#locale
- LocaleSpan#getLocale()
- SubscriptionInfo#getCountryIso()
However, only LocaleSpan#getLocale() can be used to pass application
specific languge (locale) context from applications to IMEs. Also
LocaleSpan is not designed to be used per input-context. We want to
have something in EditorInfo and LocaleList would be the right thing.
Although default implementation of TextView#onCreateInputConnection()
starts filling EditorInfo#localeList with TextView#getTextLocales() by
this CL, application developers are encouraged to provide its own
LocaleList when they are confident that the user want to use a
certain (set) of language(s).
For instance, a chat application may be able to guess what language will
be used in the conversation before the user start typing. At least it
should be able to remember the last used language for each conversation.
Another instance would be "From" and "To" EditText fields in a
translation app. Those fields should have different LocaleList based on
the languages that the user want to translate from and to.
Bug: 22859862
Change-Id: I77db5b99a7cf745d800db75baf135bb60ad04820
The logic to detect vertical expansion is inverted on RTL
text. As a result, the selection handle cannot be moved
when it's dragged toward vertically expanding and
horizontally shrinking direction.
Bug: 25893288
Change-Id: I096595d287261b1287862c6ad27ae7f6f0a73262
* changes:
FalsingManager Quick settings fix
Fixed a bug where the panel could be too small in certain cases
Fixed a bug where the margins where not updated correctly
Fixed the handling of the expand on the lockscreen
The body of {@code} must not be HTML escaped. This is one of
several changes that fix the source in conjunction with a
doclava fix.
Bug: 25757239
Change-Id: Ib38a0fa2dd2a3d68e467f78a812071e763d7e881