Commit Graph

6264 Commits

Author SHA1 Message Date
Adam Powell
a17fa708e7 Merge "Dispatch aggregated visibility when performing attachViewToParent" into nyc-dev 2016-03-18 01:12:58 +00:00
Adam Powell
c5874094eb Dispatch aggregated visibility when performing attachViewToParent
attachViewToParent is generally used for finishing a temporary detach
of a view as seen in ListView, etc. Have it dispatch aggregated
visibility to the newly added view so as to correctly update the view
as to its new state.

Bug 27702014

Change-Id: Ie8a67c78d3edf401641d52ce10bddf7cb49796fe
2016-03-17 16:27:24 -07:00
Siyamed Sinir
e7a414e16d Merge "Do not use hint text for Editor cursor positioning" into nyc-dev 2016-03-17 22:58:35 +00:00
Adrian Roos
237be37fad Merge "Copy/Paste on RemoteInputView" into nyc-dev 2016-03-17 19:55:19 +00:00
Adrian Roos
0bd8a4b29b Copy/Paste on RemoteInputView
Also fixes a bug where the remote input view stays focused
when the inline settings open.

Also prevents sharing from contexts that are not activities,
and prevents text processing when the device is not provisioned.

Bug: 27633360
Change-Id: I8b6e7f661bd873d88e7e2460d043c2aa5f849516
2016-03-17 18:43:55 +00:00
Keisuke Kuroyanagi
cb03689fef Merge "Fix: setExtractedText partial span change handling." into nyc-dev 2016-03-17 06:56:24 +00:00
Siyamed Sinir
987ec6588b Do not use hint text for Editor cursor positioning
When hint text is used for cursor positioning, the cursor may end up
in opposite direction when the locale and the hint text directions are
different. This CL uses the main text layout and discards the hint
layout while deciding on the position of those three views. The change
also includes fix for cursor and floating popup not displaying for
some cases after the change.

Bug: 22358087
Change-Id: I083d17b06273bc1d9b67656c5e12d4ff1231219c
2016-03-16 18:00:23 -07:00
Doris Liu
95ee171e30 Merge "Refinement for onVisibilityAggregated" into nyc-dev 2016-03-16 23:55:04 +00:00
Adam Powell
9c146bfee7 Refinement for onVisibilityAggregated
Change the args for onVisibilityAggregated to a single boolean for
visibility to the user. Also fix an ordering bug that could trigger a
view background drawable call to setVisible before the view would
respond true to verifyDrawable, which caused issues with some apps.

Bug 27461617
Bug 27689884

Change-Id: I58bdc7c4364264f7fa0863689ba2b76df904ef81
2016-03-16 13:32:01 -07:00
Yigit Boyar
f1f8bfb764 Merge "DO NOT MERGE Fix conditional when checking for confirm key." into nyc-dev 2016-03-16 20:27:21 +00:00
Michael Wright
759f9fed70 DO NOT MERGE Fix conditional when checking for confirm key.
Bug: 26914975
Bug: 27599828
Change-Id: I1641a44e860901d2aab83138e47af6dad3ad87b1
(cherry picked from commit 6cbdc339ce)
2016-03-16 00:09:19 +00:00
Adam Powell
41d9690c3e Add View#onVisibilityAggregated
There's a common misconception (even across the framework) that
View#onVisibilityChanged determines and reports visibility on 'this'
up to the changed view and the total visibility within the
window. Knowing this is useful for things like starting/stopping
animations. onVisibilityChanged only reports the visibility for the
specific changed view, not the effects that would have down the tree.

Add onVisibilityAggregated to report what some code thought it was
getting already, and move ImageView and ProgressBar over to using it.

Bug 27461617

Change-Id: I433f41de453e27a53f907f1d9805350f30f31de9
2016-03-15 16:20:11 -07:00
Keisuke Kuroyanagi
531d8d2fae Merge "Re-disable drag and drop in full screen extracted mode." into nyc-dev 2016-03-15 08:21:11 +00:00
Keisuke Kuroyanagi
126fdf1082 Merge "Stop automatically creating selection action mode." into nyc-dev 2016-03-15 07:41:07 +00:00
Keisuke Kuroyanagi
6e0860d959 Add a check for misspelled span change.
Previously, misspelled span is directly used in AddToDicitonary's
OnClickListener. It can crash because misspelled span can have been
updated since SuggestiosPopup is shown.
Also, AddToDictionary didn't work correctly in full screen extracted
mode. Use findEquivalentSuggestionSpan to resolve it.

Bug: 27557526
Change-Id: I51d713dbdd0c44ea2c553164b81b1123a2325aa1
2016-03-15 15:40:43 +09:00
Keisuke Kuroyanagi
c477b5830a Stop automatically creating selection action mode.
With Ic025c109539c3b5963, selection action mode is created always
when selection is made. It causes distraction in some cases.
This CL fixes this issue. This CL stops starting selection action
mode when action mode is currently not active and not intended to
restart.

Bug: 27536744
Bug: 27551819
Change-Id: I94ee66864000934a21ef0d18c1d71429c67114fa
2016-03-15 15:38:40 +09:00
Keisuke Kuroyanagi
fdfc93d770 Re-disable drag and drop in full screen extracted mode.
Drag and drop in full screen extracted mode was disabled by
Ifff4c30919bcb04f7d and re-enabled by I90d8e9f42f395b6b52.
However, related issues have not been fixed. This CL re-disables it.

Bug: 22440907
Change-Id: I753f69e170aa7e79478a5a4a3b89e4a7ef88c9e2
2016-03-15 14:47:08 +09:00
Keisuke Kuroyanagi
70ab0eec2b Fix: setExtractedText partial span change handling.
ExtractedText represents a partial text change when
partialStartOffset and partialEndOffset are set.
TextView#setExtractedText handles partial updates correctly when text
is changed, but it didn't handle them for span updates when text is
not changed.

Bug: 27635763
Change-Id: I7dc2ad0c0b7f1867738be3d6d40ea36d0d9a3e7e
2016-03-14 20:33:25 +09:00
Keisuke Kuroyanagi
f8e0da2624 Show SuggestionsPopup when there is a misspelled span.
Due to I20a86c1bdeb361686, SuggestionsPopup was not shown when there
is a suggestion span that has misspelled flag and doesn't has any
suggestions. This CL makes SuggestionHelper#getSuggestionInfo return
misspelled span info separately.

Bug: 27534987

Change-Id: Ib76588f9388287a04f1f6c9d9067ae439e493a95
2016-03-14 15:48:18 +09:00
Alan Viverette
79936ddda4 Merge "Add consistent @NonNull annotations for drawable callbacks" into nyc-dev 2016-03-11 18:42:43 +00:00
Alan Viverette
f6d87ec193 Add consistent @NonNull annotations for drawable callbacks
Bug: 27599515
Change-Id: I33fdc5392302403bfff9cc74a8226173ec962af6
2016-03-11 10:09:14 -05:00
Alan Viverette
d969cc6856 Merge "Add temporary logging to SimpleMonthView" into nyc-dev 2016-03-11 15:08:25 +00:00
Keisuke Kuroyanagi
182f5fec53 Fix: Context menu can contain obsolete suggestions.
When there are not enough number of suggestions, previously used
suggestions was continue to be used. This fixes it and simplifies code
by always allocating SuggestionInfo array.

Bug: 27602619
Change-Id: I9378315b8c810f126f65fade96ce9f6ff5271957
2016-03-11 10:08:11 +00:00
Keisuke Kuroyanagi
01ef02d785 Merge "Reset mWordIteratorWithText when SpellChecker locale is changed." into nyc-dev 2016-03-11 05:43:19 +00:00
Raph Levien
a4750fd71d Merge "Invalidate TextView on change of elegantTextHeight" into nyc-dev 2016-03-11 01:26:52 +00:00
Raph Levien
25ff8a53a3 Invalidate TextView on change of elegantTextHeight
Previously we were setting the paint but not invalidating, so it
could show stale content.

Bug: 27572149
Change-Id: I668667ec5b95a96e31a58cff0f8bbbb9958e470c
2016-03-09 13:30:55 -08:00
Alan Viverette
da7cc2d2ae Add temporary logging to SimpleMonthView
We can remove this once we figure out why the dates are messed up.

Bug: 27310206
Change-Id: I34fff5251124cc0867955255189ed323dc7170c1
2016-03-09 13:41:58 -05:00
Alan Viverette
366e137c0e Merge "Clean up SimpleMonthView formatters" into nyc-dev 2016-03-09 18:40:47 +00:00
Keisuke Kuroyanagi
e0ac5ac6f0 Reset mWordIteratorWithText when SpellChecker locale is changed.
Bug: 27537808
Change-Id: Ic55b543456cc859673b4c17cc5bf6e4b6da21e13
2016-03-09 15:33:30 +09: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
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
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
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
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
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
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
71208d6f7b Merge "Fix unexpected ellipsize for long suggestion text." into nyc-dev 2016-03-03 20:20:45 +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
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
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