Commit Graph

6260 Commits

Author SHA1 Message Date
Alan Viverette
799c311d83 Merge "Clean up SimpleMonthView formatters" into nyc-dev am: 366e137c0e
am: 60adb4d264

* commit '60adb4d264fd4be3277a5b80d8021aa1b4d79107':
  Clean up SimpleMonthView formatters
2016-03-09 18:51:00 +00:00
Alan Viverette
366e137c0e Merge "Clean up SimpleMonthView formatters" into nyc-dev 2016-03-09 18:40:47 +00:00
Keisuke Kuroyanagi
5f35184834 Merge "Make drag&drop be atomic for undo/redo." into nyc-dev am: 12298bb64c
am: 195c688756

* commit '195c6887564ab3fba8716b01d083f87de9c2e945':
  Make drag&drop be atomic for undo/redo.
2016-03-09 07:20:17 +00:00
Keisuke Kuroyanagi
fae4578311 Make drag&drop be atomic for undo/redo.
For undo/redo, drag&drop is recorded as a 2 operations, paste and
delete. This CL makes drag&drop be atomic operation to be properly
undoed/redoed.

Bug: 27268820
Change-Id: Ia38d663f046c2c65f348985934f5cfa054b0437e
2016-03-09 06:07:01 +00:00
Keisuke Kuroyanagi
d52e4a28e8 Fix: Selection is not correctly used for SuggestionsPopup. am: 713be06f7a
am: f0772438c6

* commit 'f0772438c64f46f612c5dfc8737bb929ebc4f224':
  Fix: Selection is not correctly used for SuggestionsPopup.
2016-03-08 08:40:52 +00:00
Keisuke Kuroyanagi
713be06f7a Fix: Selection is not correctly used for SuggestionsPopup.
This happens because suggestions are gathered based on the
selection after setting the cursor position to the middle
of the user selected range, which means 0-width selection
at that position. As a result, SuggestionsPopup was not
shown when any suggestion spans don't overlap middle point
of the selection.

Bug: 20709442
Change-Id: I3e1cb570f451b4ab14cf36f7da23dc2bd22f4ac8
2016-03-08 08:32:28 +00:00
Keisuke Kuroyanagi
2ef67b0614 Merge "Call View#setHasTransientState in TextView#spanChange." into nyc-dev am: 40fd5fac48
am: 6bb63dc339

* commit '6bb63dc3396795e0e895460339874acfc3824912':
  Call View#setHasTransientState in TextView#spanChange.
2016-03-08 07:37:40 +00:00
Keisuke Kuroyanagi
40fd5fac48 Merge "Call View#setHasTransientState in TextView#spanChange." into nyc-dev 2016-03-08 07:28:34 +00:00
Keisuke Kuroyanagi
af4caa6006 Call View#setHasTransientState in TextView#spanChange.
setHasTransientState(true) and setHasTransientState(false) have to
be coupled, but they were not always coupled in TextView. e.g. when
we fire PROCESS_TEXT intent.
With this CL, TextView calls setHasTransientState() always when
selection is created or cleared to make sure 2 setHasTransientState
calls are always coupled.

Bug: 27409041
Change-Id: Ib454b0fbbc2c2f8d19818f154f415c4a5d7e2d7e
2016-03-08 04:58:46 +00:00
Yohei Yukawa
93cda9a0e9 Merge "Ensure PopupDecorView is not IME-focusable during exit transition." into nyc-dev am: 64177e51e4
am: b5069e05e0

* commit 'b5069e05e04ea34631b366fcd99519974f71fdbf':
  Ensure PopupDecorView is not IME-focusable during exit transition.
2016-03-07 19:33:53 +00:00
Yohei Yukawa
64177e51e4 Merge "Ensure PopupDecorView is not IME-focusable during exit transition." into nyc-dev 2016-03-07 17:47:48 +00:00
Yohei Yukawa
dbd299de2a Ensure PopupDecorView is not IME-focusable during exit transition.
Currently PopupDecorView temporarily gets FLAG_NOT_FOCUSABLE bit during
exit transition.  When doing this we it is important that PopupDecorView
does not have FLAG_ALT_FOCUSABLE_IM bit, because having both
FLAG_NOT_FOCUSABLE and FLAG_ALT_FOCUSABLE_IM means that PopupDecorView
is IME-focusable.

To prevent IMEs from flickering, this CL ensures that PopupDecorView is
not IME-focusable during exit transition.

Bug: 27396330
Change-Id: I0cc81791b826f7d4257f0b6085c028c796fd9536
2016-03-06 22:27:40 -08:00
Keisuke Kuroyanagi
3558cbad42 Merge "Try to find equivalent SuggestionsSpan when it has been updated." into nyc-dev am: 15ae7c1328
am: a1fd59019e

* commit 'a1fd59019e89903b6bcd9b67fe24fc19a75e1d37':
  Try to find equivalent SuggestionsSpan when it has been updated.
2016-03-07 02:55:46 +00:00
Keisuke Kuroyanagi
15ae7c1328 Merge "Try to find equivalent SuggestionsSpan when it has been updated." into nyc-dev 2016-03-07 02:48:17 +00:00
Adam Powell
6b0487558b Merge "Stop ProgressBar animations when not visible" into nyc-dev am: 92e84089c4
am: 24e592a5e3

* commit '24e592a5e3a9e85cf1412f8555054c2e9911e484':
  Stop ProgressBar animations when not visible
2016-03-04 19:39:15 +00:00
Adam Powell
92e84089c4 Merge "Stop ProgressBar animations when not visible" into nyc-dev 2016-03-04 19:27:17 +00:00
Alan Viverette
e264f9503b Clean up SimpleMonthView formatters
Only generates the month and day of week labels when necessary, rather
than every time the headers are drawn.

Change-Id: Ia20042753cba08bc6b29d4defb312617a2691016
2016-03-04 13:18:48 -05:00
Adam Powell
c1bba9b9f8 Stop ProgressBar animations when not visible
Propagate setVisible calls to current drawable. Take window visibility
into account when determining drawable visibility.

Bug 27461595

Change-Id: Ia1de1d1686f26c2cf27630c5bde70f23c2c332bd
2016-03-04 10:15:35 -08:00
The Android Automerger
1ccd57a91c Merge commit '22e01d5611d14cc04055b8abcbd1e8c114a0853c' 2016-03-04 01:05:11 +00:00
Keisuke Kuroyanagi
bd4b217a28 Merge "Refresh action mode always when selection is modified." into nyc-dev 2016-03-04 00:53:59 +00:00
Keisuke Kuroyanagi
c1cd17f918 Merge "Supress SuggestionPopup for original field." into nyc-dev 2016-03-03 23:34:51 +00:00
Seigo Nonaka
1e99420e74 Merge "Fix unexpected ellipsize for long suggestion text." into nyc-dev am: 71208d6f7b
am: e40ab5d564

* commit 'e40ab5d564168bd7e0c5e24b12b4b3b05c650663':
  Fix unexpected ellipsize for long suggestion text.
2016-03-03 21:26:46 +00:00
Seigo Nonaka
71208d6f7b Merge "Fix unexpected ellipsize for long suggestion text." into nyc-dev 2016-03-03 20:20:45 +00:00
Siyamed Sinir
981250bf50 Merge "TextView should fade edges according to text." into nyc-dev am: 1ca7c80844
am: 7919b1f7e5

* commit '7919b1f7e54347929594716e5f358e11fd673d17':
  TextView should fade edges according to text.
2016-03-03 19:01:47 +00:00
Siyamed Sinir
24d606a74a Merge "Update EditText.setEllipsize JavaDoc" into nyc-dev am: 15dfbdd0ea
am: ea87a00927

* commit 'ea87a009271a15af0010f2ac86857ea9efc46dc3':
  Update EditText.setEllipsize JavaDoc
2016-03-03 18:52:18 +00:00
Siyamed Sinir
1ca7c80844 Merge "TextView should fade edges according to text." into nyc-dev 2016-03-03 18:43:23 +00:00
Siyamed Sinir
192d3bdaaf Update EditText.setEllipsize JavaDoc
Update EditText.setEllipsize JavaDoc to describe that MARQUEE is not
supported by EditText.

Bug: 26219977
Change-Id: Ibe709f3470a749c0fbb672c8ec33f0835c5d90ec
2016-03-02 14:11:56 -08:00
Yigit Boyar
786f71ef01 Merge "Check if item is selectable before calling on click" into nyc-dev am: 5ae74b7fa6
am: 82036dbe65

* commit '82036dbe6569c807500836d624e1187ed0bb2449':
  Check if item is selectable before calling on click
2016-03-02 06:20:29 +00:00
Alan Viverette
26daa2c7f6 Merge "Use Holo date/time picker layouts on very small screens" into nyc-dev am: 90ed1eca3e
am: 80e6a6a696

* commit '80e6a6a6964c64073fc51b5b5655092132cdaaeb':
  Use Holo date/time picker layouts on very small screens
2016-03-02 06:00:43 +00:00
Yigit Boyar
5ae74b7fa6 Merge "Check if item is selectable before calling on click" into nyc-dev 2016-03-02 00:36:50 +00:00
Yigit Boyar
418d0cf5c9 Check if item is selectable before calling on click
This CL fixes a bug in ListView where it might call onClick on an
un-clickable if a new touch arrives before up timeout.

We could actually consider making child position non-changable
but that will change behavior. This seems safer approach.

Bug: 27198796
Change-Id: I7b15d04efa19d1d760a294bd027f3da3aaa3a445
2016-03-01 16:09:58 -08:00
Alan Viverette
90ed1eca3e Merge "Use Holo date/time picker layouts on very small screens" into nyc-dev 2016-03-01 23:13:43 +00:00
Alan Viverette
6b3f85f87e Use Holo date/time picker layouts on very small screens
If the screen is smaller than "small" then use the Holo picker layouts.
Unifies the SavedState between delegates so that we can seamlessly
transition between them during configuration changes. Pushes the
DatePickerSpinnerDelegate up to the same level as the calendar delegate.

Bug: 27239893
Change-Id: Ida4dc2748d38bd766ae93d12aef15e963921939c
2016-03-01 16:48:04 -05:00
Andreas Gampe
23f4594523 Merge "Frameworks/base: Refactor TextView initialization" into nyc-dev am: 4f655de3de
am: 0f6f34b4eb

* commit '0f6f34b4ebd0c0b300a57a8e5cc86c95a70458b4':
  Frameworks/base: Refactor TextView initialization
2016-03-01 20:02:51 +00:00
Andreas Gampe
4f655de3de Merge "Frameworks/base: Refactor TextView initialization" into nyc-dev 2016-03-01 18:38:09 +00:00
Seigo Nonaka
f47976e7b4 Fix unexpected ellipsize for long suggestion text.
Unexpected ellipsize issue happens after
Ic8445022634e9130f9462e02bfb08d4877396ba3. By setting match_parent to
ListView, the ListView does not expand to fit the suggestion item.

Thus, explicitly setting the ListView width instead of setting
match_parent or wrap_content.

I manually verified this CL does not revive Issue 27341560 or
unexpected ellipsize for shorter text.

Bug: 27341560
Change-Id: I69b258687b4bf5510d9b2c3e690c88106bf893f5
2016-03-01 17:24:07 +00:00
Jorim Jaggi
c0a0a5d43b Fix popup window calculation for multi-window am: 8175846ed6
am: b763aebb2b

* commit 'b763aebb2b449e5a8d09f9d0a2666b142d2b9558':
  Fix popup window calculation for multi-window
2016-03-01 09:08:25 +00:00
Jorim Jaggi
8175846ed6 Fix popup window calculation for multi-window
If ignoreBottomDecorations=true, the display size was extracted from
the resources. However, this didn't work if the parent window was in
multi-window, as all the calculations went wrong. Instead, introduce
View.getWindowDisplayFrame which returns the "full" frame of the task
the window is currently in, without any insets, and use that to
calculate the bottom edge.

Bug: 26255254
Change-Id: I8b235b335775022ae399ee082d1200aa76cc047c
2016-03-01 09:00:29 +00:00
Keisuke Kuroyanagi
d319450307 Try to find equivalent SuggestionsSpan when it has been updated.
Suggestion pickup was canceled when SuggestionsSpan corresponding
to the suggestion cannot be found.
This was a problem when suggestion is selected in extracted mode.
Selection is cleared just before creating SuggestionsPopup.
The selection update is reported to the original EditText and it
will invoke TextView#setExtractedText of the extracted one.
In this method, SuggestionSpans are replaced with the new
SuggestionSpans that usually have the same contents as the old
SuggestionSpans.

This CL re-enables "Replace" item in extracted mode.

Bug: 22038802

Change-Id: I74bb813b110fb2f633b8578790d14039755f2d79
2016-02-29 16:41:46 -08:00
Keisuke Kuroyanagi
bec9715905 Refresh action mode always when selection is modified.
Text action mode was not correctly updated when the selection
is modified by keyboard, app or IME.
With this CL, Editor#refreshTextActionMode is called always when
selection is updated. This method properly starts, stops or
invalidates text action mode if selection was modified outside of
cursor controllers.

Bug: 10527362
Bug: 22937774

Change-Id: Ic025c109539c3b59638226be4c4c9adf5ea0c38c
2016-02-29 16:41:46 -08:00
Keisuke Kuroyanagi
4a696ac7ca Supress SuggestionPopup for original field.
Previously, popup window or insertion handle could be shouwn at
a strange position as they could be shown for the original input
field in full screen extracted mode.
This CL stops showing SuggestionPopup for the original input field
in full screen extracted mode.

Bug: 22038802
Bug: 27313458
Change-Id: I585913328182d996f0201c53c028a1991f7b435b
2016-02-29 16:41:38 -08:00
Andreas Gampe
ddc1397eba Frameworks/base: Refactor TextView initialization
To allow static initialization of a number of View classes based
on TextView, refactor the initialization of the font cache to be
explicit from the zygote.

Bug: 27265238
Change-Id: I1b71086d3f49d8b3e72eea2bf8359351d25fc0fd
2016-02-29 11:13:01 -08:00
Aurimas Liutikas
0bb2d31d99 Merge "Fix crash when restoring SearchView." into nyc-dev am: 0a04ab2418
am: 52628bc847

* commit '52628bc847732868f1ed0ec65a738f873c1ef15a':
  Fix crash when restoring SearchView.
2016-02-29 18:26:20 +00:00
Aurimas Liutikas
7849a3d785 Fix crash when restoring SearchView.
I forgot to include Parcelable.Creator when I added SearchView
iconified state saving.

Bug: 27357167
Change-Id: Ia96490aa9c12c4042f50ba4b1aeb7422b37a1d4c
2016-02-26 15:27:31 -08:00
Selim Cinek
f1a8cedbad Merge "Added convenience methods to use chronometer countdown methods" into nyc-dev am: a94742c7f9
am: 39e1cc558b

* commit '39e1cc558bf6f3f7442f553a36f8ba88375b58e6':
  Added convenience methods to use chronometer countdown methods
2016-02-26 19:10:28 +00:00
Selim Cinek
a94742c7f9 Merge "Added convenience methods to use chronometer countdown methods" into nyc-dev 2016-02-26 19:05:04 +00:00
Siyamed Sinir
c066127526 TextView should fade edges according to text.
TextView should decide which edge to fade by checking if and where the
text is cut. This CL updates fading edge strength related functions
accordingly.

Bug: 10918591
Change-Id: I57aa964cfbbb44289c52eea99c05c77750dce1cd
2016-02-25 16:53:58 -08:00
Selim Cinek
81c23aac78 Added convenience methods to use chronometer countdown methods
Bug: 27343480
Change-Id: Iea4d0259ba8c3ab91fec5ee04ea4b39e5dd988bf
2016-02-25 16:23:13 -08:00
Alan Viverette
e47aa888a9 Merge "Revert "Fix exit transition and dismiss callback for popup exit transition"" into nyc-dev am: 9cae665410
am: 0fe51a4d4e

* commit '0fe51a4d4e232206ff9f1ae65b8e3c277ad06b93':
  Revert "Fix exit transition and dismiss callback for popup exit transition"
2016-02-25 22:27:25 +00:00
Alan Viverette
7970894a9c Revert "Fix exit transition and dismiss callback for popup exit transition"
This reverts most of commit 21d361806c, which
broke too many expectations in both apps and framework widgets. We need to
find a safer way to handle the exit transition callback.

Bug: 27359366
Bug: 27353218
Change-Id: I769ac7a25cb900c50e857839ca0563fbc5a3cb16
2016-02-25 16:57:08 -05:00