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
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
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
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
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
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
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
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
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
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
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
Previously we were setting the paint but not invalidating, so it
could show stale content.
Bug: 27572149
Change-Id: I668667ec5b95a96e31a58cff0f8bbbb9958e470c
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
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
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
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
Only generates the month and day of week labels when necessary, rather
than every time the headers are drawn.
Change-Id: Ia20042753cba08bc6b29d4defb312617a2691016
Propagate setVisible calls to current drawable. Take window visibility
into account when determining drawable visibility.
Bug 27461595
Change-Id: Ia1de1d1686f26c2cf27630c5bde70f23c2c332bd
Update EditText.setEllipsize JavaDoc to describe that MARQUEE is not
supported by EditText.
Bug: 26219977
Change-Id: Ibe709f3470a749c0fbb672c8ec33f0835c5d90ec
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
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
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