Commit Graph

6141 Commits

Author SHA1 Message Date
Alan Viverette
a884fbeed9 Merge "Remove delay before performing drop down item click" 2016-01-15 19:04:40 +00:00
Alan Viverette
388eb91c12 Merge "Clean up CalendarView docs and annotations" 2016-01-14 16:17:26 +00:00
Alan Viverette
4bf96caa84 Merge "Apply menu callbacks to existing Toolbar menu view" 2016-01-14 16:16:00 +00:00
Alan Viverette
7a66ba9ddb Merge "Clean up lint warnings in popup menu presenter classes" 2016-01-13 18:56:24 +00:00
Alan Viverette
be91ad5e21 Remove delay before performing drop down item click
We don't show the ripple on press for bounded ripples any more, so there's
no reason to delay the click.

Also adds method annotations.

Bug: 25849904
Bug: 25821164
Change-Id: I4f493b369deb00a19345a319befa277170d09a15
2016-01-13 13:55:44 -05:00
Alan Viverette
02cd0f9105 Clean up lint warnings in popup menu presenter classes
Change-Id: I6b4cce1c4788b408615af0c93575e02e75b4c3ca
2016-01-13 13:33:17 -05:00
Alan Viverette
5190f1737f Apply menu callbacks to existing Toolbar menu view
Bug: 25872174
Change-Id: I44f4fad27e5e48a8ecdf0c63e135fbf566517cea
2016-01-13 11:20:26 -05:00
Alan Viverette
8a77da8626 Merge "Apply tick mark tint during view construction" 2016-01-13 15:16:11 +00:00
Alan Viverette
d154a5bb8d Apply tick mark tint during view construction
...otherwise it never gets applied.

Change-Id: I06991b3cedcf3dcfb8e98ae61e3d679c35b68839
2016-01-13 10:10:22 -05:00
Keisuke Kuroyanagi
2d12690d70 Merge "TextView: Offer suggestions in context menu." 2016-01-13 08:02:00 +00:00
Alan Viverette
850cd726c8 Apply Spinner dropDownSelector value from XML
Bug: 26400523
Change-Id: I7e09d709214b6841b688cf130638583a9db01f19
2016-01-11 15:34:43 -05:00
Alan Viverette
b097321719 Clean up CalendarView docs and annotations
Change-Id: Ie086af87b4113ef83d07370eb2b25fd7530a8781
2016-01-08 14:20:12 -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
Keisuke Kuroyanagi
1cd8aac4ea TextView: Offer suggestions in context menu.
- Extract SuggestionInfo fetching code as SuggestionHelper and use it for
both context menu and existing suggestion popup.
- Show suggestion in "Replace..." sub menu.

Bug: 19397276

Change-Id: I20a86c1bdeb3616863b846237be55fa1a9b6ffdd
2015-12-21 18:01:40 +09: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