Commit Graph

6129 Commits

Author SHA1 Message Date
Alan Viverette
850cd726c8 Apply Spinner dropDownSelector value from XML
Bug: 26400523
Change-Id: I7e09d709214b6841b688cf130638583a9db01f19
2016-01-11 15:34:43 -05:00
Alan Viverette
598d8eafd6 Merge "Add support for tick marks in SeekBar" 2016-01-08 18:16:37 +00:00
Narayan Kamath
8090bb1a3f Merge "Fixed calendar fields comparison" am: 9aeb6edf55
am: cd51388e01

* commit 'cd51388e01fdecd516218c7a9597618b10781843':
  Fixed calendar fields comparison
2016-01-08 09:44:32 +00:00
Philipp Hasper
81fd6b48a0 Fixed calendar fields comparison
Month was compared with the day and vice versa.
Found by dukejeffrie.

Change-Id: Ic4efca440c408325819ff1df85db7b407cf3207e
2016-01-08 09:29:39 +00:00
Alan Viverette
41a90675be Add support for tick marks in SeekBar
Bug: 26399774
Change-Id: Ie4722fb91da96468325b52a22f72372ba4f536d6
2016-01-07 16:35:40 -05:00
Deepanshu Gupta
7a8fb26c20 Prevent infinite loop in case of integer overflow.
Bug: 26331754
Change-Id: I29068159204ecd2e03e44fbb2375d2e116774e07
2016-01-07 13:29:04 -08:00
Alan Viverette
d01fafb7ff Merge "Avoid NPE when ActionMenuPresenter is intialized with null MenuBuilder" 2016-01-07 15:48:40 +00:00
Alan Viverette
28a8468995 Avoid NPE when ActionMenuPresenter is intialized with null MenuBuilder
Also adds annotations to accurately reflect nullability.

Bug: 26318920
Change-Id: Ia3b170dd301edfc0088a11ee5764c24bab2f10aa
2016-01-04 13:43:23 -05:00
Chong Zhang
7c9732db0e Fix popup window position calculation in multiwindow mode
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
2015-12-29 14:53:27 -08:00
George Mount
0b8056c0bc Merge "Fix problem where enter and space key do nothing on ListView." 2015-12-18 22:32:58 +00:00
George Mount
26268f93ce Fix problem where enter and space key do nothing on ListView.
Enter should select the currently focused item. It was doing
nothing.

Change-Id: I149ed72804234c1c1da4a7a9be8c9f405722d4ec
2015-12-18 13:00:46 -08:00
Wale Ogunwale
8216eb2221 Added PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME window flag
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
2015-12-18 10:42:42 -08:00
Alan Viverette
31c2ac78d9 Merge "Handle null result from getVirtualChildAt()" 2015-12-17 19:07:29 +00:00
Alan Viverette
0cc6b5a496 Merge "Propagate TextView drawable state after resolving RTL drawables" 2015-12-17 17:51:53 +00:00
Alan Viverette
ad52693cf3 Handle null result from getVirtualChildAt()
Also adds final where the method was being called, adds Nullable
annotation to method, and updates docs.

Bug: 25985497
Change-Id: I847a8507f2e3970f1340cddf4abf8650dda22b35
2015-12-17 12:42:39 -05:00
Keisuke Kuroyanagi
d056081e50 TextView: Open context menu on right click.
- 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
2015-12-17 17:50:42 +09:00
Alan Viverette
189d4f5b77 Propagate TextView drawable state after resolving RTL drawables
Bug: 24502082
Change-Id: Iec9c44041622d19401fc074947e15b4843f79d86
2015-12-16 16:06:23 -05:00
Keisuke Kuroyanagi
366a88603e Change cursor shape to STYLE_HAND on ClickableSpans
Bug: 19544351
Change-Id: Ibbee410bf22db6962b2ba2b89111c9e34fce4747
2015-12-16 15:50:37 +09:00
Michael Wright
e5f4a9c112 Merge "Make KEYCODE_SPACE a confirm key." 2015-12-15 16:41:16 +00:00
Jun Mukai
81245161a0 Merge "Make public pointer icon API with custom icons." 2015-12-15 04:46:53 +00:00
Jun Mukai
d4eaef7f4c Make public pointer icon API with custom icons.
BUG: 25778347, 23804184
Change-Id: If138b97c750c912e9848412c27b65004899961eb
2015-12-14 19:45:10 -08:00
Michael Wright
aa1a94daaa Make KEYCODE_SPACE a confirm key.
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
2015-12-14 17:30:25 -05:00
Robert Carr
a1eb439eee Move window replacement tracking to window state.
In preparation for supporting replacement of child windows
we make replacement per window rather than per app.

Bug: 26070641

Change-Id: Ifa332086599c125611e430219c9497bae7e2ce31
2015-12-14 10:49:56 -08:00
Keisuke Kuroyanagi
ff37557795 Merge "Fix selection expansion detection logic." 2015-12-10 07:18:21 +00:00
Keisuke Kuroyanagi
155aecb18b Move double tap/triple click detection to Editor.
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
2015-12-10 06:41:10 +00:00
Keisuke Kuroyanagi
4368d05af7 Triple click to start paragraph based selection.
- Detect triple click in TextView#onTouchEvent.
- Select paragraph on triple click.
- Extend drag accelerator to support paragraph based
selection.

Bug: 19544351
Change-Id: I0a6752a0642a2c569b69a1fc2c0f49169a72844a
2015-12-10 06:01:19 +00:00
Keisuke Kuroyanagi
b2ba0605ef Remove unneeded method HandleView#showAtLocation.
Now, the handles will be shown at the proper positions in
Editor#startSelectionActionMode. No need to call
HandleView#showAtLocation.

Change-Id: I5a7fb7bc4419a49234584bd06db5acc3d23168b8
2015-12-10 14:41:52 +09:00
Keisuke Kuroyanagi
40329b8540 Merge "Move mouse selection handling logic to Editor." 2015-12-10 05:14:11 +00:00
Keisuke Kuroyanagi
97af673e1f Move mouse selection handling logic to Editor.
- 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
2015-12-10 05:13:40 +00:00
Chet Haase
709bf2a37c Merge "Revert "Add support for partial view layouts"" 2015-12-09 18:40:06 +00:00
Alan Viverette
2ce4f73bf7 Merge "Snap AbsSeekBar touches to nearest progress tick" 2015-12-09 17:43:05 +00:00
Chet Haase
4610eeff9c Revert "Add support for partial view layouts"
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
2015-12-08 16:45:23 -08:00
Alan Viverette
9c17c85d1e Snap AbsSeekBar touches to nearest progress tick
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
2015-12-08 13:23:58 -05:00
Chet Haase
f1b40f65b0 Merge "Fix requestLayout() optimizations" 2015-12-07 21:29:00 +00:00
Chet Haase
016f445757 Fix requestLayout() optimizations
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
2015-12-07 13:17:44 -08:00
Chris Banes
f2a7e9712f Fix possibility of ScrollView not allowing clicks after a fling
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
2015-12-07 11:53:26 +00:00
Yohei Yukawa
658c29e86e retry: Add @hide SpellCheckerSubtype#getLocaleObject().
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
2015-12-04 14:43:01 -08:00
Yohei Yukawa
8687b42463 Merge "Revert "Add @hide SpellCheckerSubtype#getLocaleObject()."" 2015-12-04 22:30:45 +00:00
Yohei Yukawa
80a918c3bd Revert "Add @hide SpellCheckerSubtype#getLocaleObject()."
This reverts commit e3c761c87e.

Previous CL unintentionaly contained behavior change.

Change-Id: I1e350f224df815e991d9f42ac4145ecfc5c1c8b0
2015-12-04 22:26:41 +00:00
Yohei Yukawa
ab004d5ad8 Merge "Add @hide SpellCheckerSubtype#getLocaleObject()." 2015-12-04 22:17:32 +00:00
Yohei Yukawa
e3c761c87e Add @hide SpellCheckerSubtype#getLocaleObject().
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
2015-12-04 22:07:39 +00:00
Filip Gruszczynski
ae5fe6abb3 Merge "Remove some sized based resource (match support lib removal)." 2015-12-04 20:09:31 +00:00
Filip Gruszczynski
b635fdaf22 Remove some sized based resource (match support lib removal).
Bug: 25394588
Change-Id: I5b5b446667fc6ec028ec259da236967d3b2d22d2
2015-12-03 18:37:38 -08:00
Yohei Yukawa
b4ea6ddc03 Merge "Introduce EditorInfo#locales." 2015-12-04 01:21:02 +00:00
Yohei Yukawa
8d6eeb01df Introduce EditorInfo#locales.
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
2015-12-03 16:10:37 -08:00
Alan Viverette
9643e73951 Merge "Ensure only one context menu is shown at a time" 2015-12-03 21:27:07 +00:00
Neil Fuller
568f4de11a Merge "Fix @code escapes" 2015-12-03 09:44:01 +00:00
Keisuke Kuroyanagi
26454141a8 Fix selection expansion detection logic.
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
2015-12-02 15:04:57 -08:00
Selim Cinek
7943316678 Merge changes I2af07b57,Ic0a774e8,Ica3d21ff,Id4c3c901
* 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
2015-12-02 19:08:58 +00:00
Neil Fuller
71fbb81b14 Fix @code escapes
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
2015-12-02 14:24:11 +00:00