Commit Graph

5328 Commits

Author SHA1 Message Date
Andrei Stingaceanu
eea5a9e0de Merge "DO NOT MERGE - Minor clean up: redundant functionality in Editor and TextView." into mnc-dev 2015-04-29 16:21:16 +00:00
Alan Viverette
e861c8eb63 Merge "Fix DatePicker max date, disabled day color, and arrow visibility" into mnc-dev 2015-04-28 23:39:23 +00:00
Chris Craik
2f1d09c3c5 Merge "Use default constructor to get anti-aliasing" into mnc-dev 2015-04-28 22:06:17 +00:00
Alan Viverette
5c33949d02 Fix DatePicker max date, disabled day color, and arrow visibility
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
2015-04-28 14:07:36 -07:00
Chris Craik
58fc522a69 Use default constructor to get anti-aliasing
Change-Id: I3e078a3bc91a2fd703984ba18b5e7e98069b32f1
2015-04-28 11:49:27 -07:00
Andrei Stingaceanu
47f82ae811 DO NOT MERGE - Minor clean up: redundant functionality in Editor and TextView.
This is a no-op.

Change-Id: I28ec363a256d3d1a94e378d428897cc67c77d578
2015-04-28 17:43:54 +01:00
Chris Craik
956f340aac Remove unused flags and dirty rects
bug:17209071

Also update DisplayList->RenderNode naming in Editor

Change-Id: I1d505640ba7388a0b0042d9c787f859e45a24da5
2015-04-28 09:40:01 -07:00
Keisuke Kuroyanagi
d2b9bd80a2 Merge "Fix: End handle disappears when the selection is short." into mnc-dev 2015-04-28 04:58:45 +00:00
Robert Shih
39dbbd93e4 MediaController: workaround to disable seek
An example use case is live HLS streams.

Bug:19489473
Change-Id: I9c278f2875a5faaf1af092cc84888d4280a00747
2015-04-27 14:42:22 -07:00
Keisuke Kuroyanagi
28b5b14449 Fix: Selection handles are wrongly shown.
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
2015-04-27 09:48:26 +00:00
Keisuke Kuroyanagi
6cda1e28e3 Fix: End handle disappears when the selection is short.
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
2015-04-27 09:45:06 +00:00
Adam Cohen
daa58a4008 Merge "Remove problematic early return from notifyDataSetChanged" 2015-04-24 23:43:57 +00:00
Adam Cohen
005f7cf13e Remove problematic early return from notifyDataSetChanged
-> 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
2015-04-24 16:23:42 -07:00
Wale Ogunwale
e31788e12b Merge "Remove ZoomButtonsController view immediately when !visible" 2015-04-24 20:47:26 +00:00
Wale Ogunwale
5e641d6536 Remove ZoomButtonsController view immediately when !visible
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
2015-04-24 13:46:11 -07:00
Alan Viverette
d4925af839 Merge "Change direction of DPAD_LEFT and DPAD_RIGHT if LayoutDirection is RTL" 2015-04-24 19:40:58 +00:00
Jorn Jacobsson
599b64f937 Change direction of DPAD_LEFT and DPAD_RIGHT if LayoutDirection is RTL
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
2015-04-24 12:34:50 -07:00
Alan Viverette
6e37e5a006 Merge "Implement RTL support in framework ViewPager, DatePicker" 2015-04-24 18:06:50 +00:00
Keisuke Kuroyanagi
0591651a62 Quit showing "SELECT ALL" for inappropriate fields.
This blocks showing "SELECT ALL" in FloatingToolBar when
the input is empty or the field is a password field.

Bug: 20407551
Change-Id: Ia25700bbee4f78445776af46eb1369af6600d946
2015-04-24 19:10:50 +09:00
Abodunrinwa Toki
56195db6c4 TextView: Invalidate ActionMode content rect on scroll.
Bug: 20470464
Change-Id: I1a9178903db00d1cef5a835d055939b2ce138290
2015-04-23 19:10:54 +00:00
Andrei Stingaceanu
e72e94767c Merge "Introduce "Share" option to the floating text selection toolbar." 2015-04-23 09:15:07 +00:00
Keisuke Kuroyanagi
08f7fd4d79 Fix: Wrong condition to detect selection shrink.
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
2015-04-23 14:33:07 +09:00
Alan Viverette
ddf655c49f Implement RTL support in framework ViewPager, DatePicker
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
2015-04-22 13:43:31 -07:00
Andrei Stingaceanu
c649dae8e0 Merge "Cleanup unused icons on the floating toolbar." 2015-04-22 09:25:31 +00:00
Keisuke Kuroyanagi
05fd8d50b2 Stop showing "Replace" when selection isn't inside spans.
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
2015-04-22 15:33:27 +09:00
Andrei Stingaceanu
fbafc78648 Cleanup unused icons on the floating toolbar.
Floating toolbars move to a text based actionMode.

Bug: 20212703
Change-Id: Id94599487c2c70712f20d7044cd7ba1248813945
2015-04-21 11:55:47 +01:00
Andrei Stingaceanu
7f0c5bd543 Introduce "Share" option to the floating text selection toolbar.
Change-Id: I04b564224847eeb4e5f2a61f6a41f6046a1969a1
2015-04-21 11:34:15 +01:00
Alan Viverette
33f0c93fa9 Merge "Update the popup reveal animation to more closely match window reveal" 2015-04-21 00:29:36 +00:00
Andrei Stingaceanu
6154b0909c Text processing - stop showing an empty toast.
If the text processing app returns empty or null text don't show the toast.

Bug: 20326103
Change-Id: Ib8534b851d2046fe7c17f674f170f9630e4a364d
2015-04-20 15:03:55 +01:00
Alan Viverette
65aea84c5a Merge "Move date picker arrows out of SimpleMonthView" 2015-04-17 18:16:19 +00:00
Alan Viverette
78bf1d329a Move date picker arrows out of SimpleMonthView
Also fixes incorrect docs in Drawable.

Bug: 20188255
Change-Id: I01c8563f734d9c1dad1e149bee80c651981e469f
2015-04-17 10:39:22 -07:00
Filip Gruszczynski
05636471fc Merge "Make UNSPECIFIED measure spec include size hint." 2015-04-17 00:03:22 +00:00
Alan Viverette
df3139db33 Merge "D-pad should be able to push seek bar to 0 or max value" 2015-04-16 21:50:57 +00:00
Filip Gruszczynski
b6824bf58a Make UNSPECIFIED measure spec include size hint.
Change-Id: I6c4f193d0590824c644e20e8af16d055a04ac9c9
2015-04-16 14:39:13 -07:00
Alan Viverette
95888c07e9 Update the popup reveal animation to more closely match window reveal
Hand-waves the default interpolators for efficiency's sake until we can
implement interpolator caching or preloading.

Change-Id: Ibc618a0c092b08a33fb91265ec15665c94831b6b
2015-04-16 13:27:50 -07:00
Alan Viverette
12a44914c0 D-pad should be able to push seek bar to 0 or max value
Bug: 20198766
Change-Id: Ibd48919fea9915e38a1f6746fa43ea5125d0d087
2015-04-16 13:06:00 -07:00
Mady Mellor
241e119679 Merge "Recognize stylus touch + press button as a longpress in AbsListView" 2015-04-16 16:54:41 +00:00
Clara Bayarri
1809427647 Merge "Editor: keep text selection when starting a process text intent." 2015-04-16 10:14:37 +00:00
Raph Levien
e319d5a362 Add left and right indent arrays to TextView
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
2015-04-15 18:57:53 -07:00
Yoshiki Iguchi
b1a3946712 Merge "TextView.extractText should not crash with null arguments" 2015-04-16 00:19:03 +00:00
Yoshiki Iguchi
ee14772531 TextView.extractText should not crash with null arguments
TextView.extractText crashes when null argument(s) is given. This patch
adds a null-check and prevents the crash.

Bug: 5762732

Change-Id: I945b6cde77f30cb5ee2944797732ec69890711bf
2015-04-15 18:09:52 +09:00
Chris Banes
5c1405e10c Merge "Unhide PopupWindow window layout type calls" 2015-04-15 07:05:51 +00:00
Mady Mellor
e556198495 Recognize stylus touch + press button as a longpress in AbsListView
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
2015-04-14 15:06:40 -07:00
Roozbeh Pournader
80003c6e9e Merge "Add more firstStrong alternatives for textDirection." 2015-04-14 17:41:18 +00:00
Mady Mellor
b3a0660eab Merge "Use HandleView's previous offset for text selection handles" 2015-04-14 16:52:06 +00:00
Clara Bayarri
578286fb32 Editor: keep text selection when starting a process text intent.
This CL makes sure the selection is not cleared when a text processing
intent starts, so that we can properly replace the selection when it
comes back.

It also fixes a related issue with the selection handles. The previous
code assumed a text selection mode starts from touch and enters drag
mode by default. This CL makes the code conscious of whether it should
show the selection cursors or enter drag mode.

BUG: 20148456
Change-Id: Ie8632e4a96f431dc6b2e4d0b4d3978eb55149172
2015-04-14 16:49:25 +01:00
Chet Haase
575217fc3d Make ActionBar animations work correctly
Previous ActionBar animations didn't handle configuration changes
or other situations in which the view would get detached. listeners
would stay on the view and would attempt to do something nonsensical
in the new window. This new approach removes listeners on window
detach to avoid this problem.

Issue #20125407 Settings Crashes when changing orientation of device

Change-Id: I0b3bbd0f6fc23cdb4cbd646b0d2772d72d3d795d
2015-04-14 14:09:26 +00:00
Chris Banes
36344a90c2 Unhide PopupWindow window layout type calls
BUG: 20172711

Change-Id: I31bacf840908f77d2be96a6b10df495e30f0af07
2015-04-14 10:44:14 +01:00
Roozbeh Pournader
b51222a301 Add more firstStrong alternatives for textDirection.
The current firstStrong value of textDirection is locale-dependent,
and can create problems when consistent display of text across
locales of potentially different direction is desired.

This adds two new values for textDirection, firstStrongLtr and
firstStrongRtl, which don't use the locale or the view's direction as
fallback, but explicit values of LTR or RTL.

Using firstStrongLtr also guarantees the exact algorithm defined in
the Unicode Bidirectional Algorithm to be used for determining
direction.

Bug: 13428339
Change-Id: I450d4f6b5197763ace7f9506c72cf87a90da4218
2015-04-13 15:01:43 -07:00
Alan Viverette
147931e3f9 Merge "Fix date picker dialog size" 2015-04-13 18:13:48 +00:00