Commit Graph

5214 Commits

Author SHA1 Message Date
Alan Viverette
835d798606 Docs nit
Change-Id: I390997826db6997f843cafc4136633937e185e82
2015-03-23 14:54:35 -07:00
Alan Viverette
167fa2fdb7 Merge "Clean up date picker" 2015-03-23 21:36:08 +00:00
Alan Viverette
452fe34984 Clean up date picker
Bug: 19758502
Change-Id: I11ed62245d15d155335f5652000b9dc81185e2f9
2015-03-23 14:26:09 -07:00
Alan Viverette
53796737eb Merge "Fix default width and height for PopupWindow's decor view" 2015-03-23 20:54:43 +00:00
Alan Viverette
0ef59ac0e5 Update DatePicker and CalendarView to latest Material spec
Bug: 19431364
Change-Id: If364a051a5208d170495de4182e46b32c7560e08
2015-03-23 13:13:25 -07:00
Alan Viverette
2a16460c7c Merge "Fix radial time picker for Explore by Touch and scroll actions" 2015-03-23 17:35:40 +00:00
Alan Viverette
4a6bd692d2 Fix radial time picker for Explore by Touch and scroll actions
Bug: 19889521
Change-Id: I4fa6b9e0459630ecdb4144f4640213415247735a
2015-03-23 10:34:23 -07:00
Alan Viverette
259c284069 Fix default width and height for PopupWindow's decor view
Fixes a regression whereby failing to explicitly set a width and height
would cause the popup window's decor view to be 0 width and height.

Also deprecates unnecessary method for setting window width and
height spec and replaces with less-confusing setters.

Cleans up javadoc for modified methods.

Bug: 19538371
Change-Id: I20da3ff02ad12e99adf14c056edd1a890b5c322a
2015-03-22 17:39:39 -07:00
Vladislav Kaznacheev
fca29e7d49 Merge "Start respecting View.DRAG_FLAG_GLOBAL flag." 2015-03-20 00:15:43 +00:00
Alan Viverette
eef3bcbbe4 Merge "Replace usages of deprecated Resources.getColor() and getColorStateList()" 2015-03-19 01:54:09 +00:00
Alan Viverette
4a357cd2e5 Replace usages of deprecated Resources.getColor() and getColorStateList()
Change-Id: I8f64fe6c4c44a92ff6d07250223ba590a1d691b0
2015-03-18 18:37:18 -07:00
Clara Bayarri
6820434edd Merge "Editor: Avoid the paste popup from coming up when a word is selected." 2015-03-19 00:04:37 +00:00
Andreas Gampe
870c4ba78a am 1eca7d66: am 2a247b36: Merge "Frameworks/base: Fix visibility flag in Editor"
* commit '1eca7d66ee3da87c622259544794b8fe998cdb92':
  Frameworks/base: Fix visibility flag in Editor
2015-03-18 23:50:35 +00:00
Vladislav Kaznacheev
c3debf29d6 Start respecting View.DRAG_FLAG_GLOBAL flag.
Respect flags passed to startDrag (they used to be ignored).
Allow global drag&drop for text views.

Bug: 19548858
Change-Id: I981cfd617ebc6f5f2d59ebded798c22dc4920d38
2015-03-18 16:32:21 -07:00
Clara Bayarri
6351e66014 Editor: Avoid the paste popup from coming up when a word is selected.
The existing code already fires the selection action mode, which
contains all the elements from the popup.

This is the last case remaining in which the popup is used, so also
clean up all popup related code.

Change-Id: I68b8b7bc8076279371955265b0088bfa0c22760b
2015-03-18 23:05:35 +00:00
Clara Bayarri
10ff56ec6d Merge "Editor: Make the Insertion handle start/finish the selection action mode on tap." 2015-03-18 23:02:58 +00:00
Clara Bayarri
452fa75207 Editor: Make the Insertion handle start/finish the selection action mode on tap.
The Insertion handle used to show/hide the paste popup, not that we are
unifying it with the selection action mode it should start/finish the mode.

There are no other use cases of the popup with the insertion handle, so that
code is cleaned up.

Change-Id: I40703bc8316f217edaf97aff72436935de60500c
2015-03-18 22:41:39 +00:00
Andreas Gampe
1eca7d66ee am 2a247b36: Merge "Frameworks/base: Fix visibility flag in Editor"
* commit '2a247b361089c0744202b604e22f9a79d239b92c':
  Frameworks/base: Fix visibility flag in Editor
2015-03-18 22:33:09 +00:00
James Cook
f2560e62cf Merge "Improve undo support for text entered with IME" 2015-03-18 21:39:03 +00:00
Chris Craik
43c410eaac Merge "Remove HardwareCanvas" 2015-03-18 21:36:56 +00:00
James Cook
d202668670 Improve undo support for text entered with IME
Use span properties to detect:
* Composing text - don't record undo operations
* Completing a composition - record an insert undo operation
* Canceling a composition - don't record

Save the composition state on parcel/unparcel.

Stop using begin/end batch edit to try to detect when a TextWatcher
is modifying the text. IMEs trigger multiple InputFilter passes in
a single batch edit. Use SpannableStringBuilder to determine when
we're in a TextWatcher callback because it is the authority on that
state.

Fix a bug in undo manager where it doesn't forget undos correctly if
there are more than one in the stack.

Bug: 19332904
Change-Id: Iaa9b0b2a7bf6683302cc85e7616e5d5fcc9fa202
2015-03-18 14:36:41 -07:00
Clara Bayarri
532c8e9b35 Merge "Editor: Fire the selection Action Mode when long pressing on an empty space" 2015-03-18 20:21:08 +00:00
Alan Viverette
8c9d897534 Merge "Remove unnecessary null check in FastScroller" 2015-03-18 19:36:53 +00:00
Clara Bayarri
29d2b5aa48 Editor: Fire the selection Action Mode when long pressing on an empty space
This used to fire the "paste" popup instead. It is a tiny step towards
unifying the cut/copy/paste action mode and paste popup.

Change-Id: I03dfcc294d4453e92464fc4f714468f58c692f24
2015-03-18 18:01:42 +00:00
Alan Viverette
a0f0494059 Remove unnecessary null check in FastScroller
Bug: 19805564
Change-Id: I12e1a3cadf52038fb480e5694d12b6ec5e0e467b
2015-03-18 10:25:43 -07:00
Alan Viverette
0e7c022601 Merge "Add single-arg TextView.setTextAppearance, deprecate two-arg method" 2015-03-18 00:34:38 +00:00
Andreas Gampe
4976e2de8d Frameworks/base: Fix visibility flag in Editor
Fix double check.

Bug: 19797138
Change-Id: I95e694f384f1f25d6cf3b6a1669052940385e41d
2015-03-17 16:08:43 -07:00
Tor Norbye
da81fa569e Merge "Add resource type annotations to some APIs" 2015-03-16 21:20:31 +00:00
Alan Viverette
3808227615 Add single-arg TextView.setTextAppearance, deprecate two-arg method
The text appearance should always be inflated against the TextView's
original inflation context.

Change-Id: Id9fd219d83bbe76e19b4d200a37ef4240665bfcd
2015-03-16 09:41:30 -07:00
Tor Norbye
417ee5ba89 Add resource type annotations to some APIs
Change-Id: I37c8afdaea455aa92bc8270bb2dfd60616c5f9bc
2015-03-13 11:20:45 -07:00
Dianne Hackborn
484bc6e5a7 Merge "More work on collecting assist data." 2015-03-13 16:41:29 +00:00
Dianne Hackborn
a83ce1dd2a More work on collecting assist data.
Optimize parceling of AssistData (which is now renamed to
AssistStructure) by pooling duplicated class name strings.

Change text associated with a view node to a CharSequence,
so styling information comes along.

Include global text attributes -- size, colors, etc.

Introduce a new AssistContent structure, which allows us
to propagate information about the intent and data the
activity is looking at.  This further allows us to propagate
permission grants, so the assistant can dig in to that data.
The default implementation propagates the base intent of an
activity, so if for example you bring up the assistant while
doing a share the assistant itself has the same information
and access that was given to the share activity (so it could
for example share it in another way if it wanted to).

Did some optimization of loading PersistableBundle from xml,
to avoid duplicating hash maps and such.

Changed how we dispatch ACTION_ASSIST to no longer include
the more detailed AssistStructure (and new AssistContent)
data when launching; now the example code that intercepts
that needs to be sure to ask for assist data when it starts
its session.  This is more like it will finally be, and allows
us to get to the UI more quickly.

Change-Id: I88420a55761bf48d34ce3013e81bd96a0e087637
2015-03-12 17:07:51 -07:00
Marco Nelissen
a80ac05f85 resolved conflicts for merge of 42f55d1e to master
Change-Id: I9c26861c5b0e26bb55e50b2133b7561348a01aec
2015-03-12 16:17:45 -07:00
Roozbeh Pournader
4f831caa49 Merge "Fix negative touch word offset that caused crashing when selecting text" 2015-03-12 21:45:22 +00:00
Mady Mellor
27d6b97f63 Fix negative touch word offset that caused crashing when selecting text
Previously the offset between the touch event and the start / end of
the word could result in a negative value - we don't care or want
this value to be negative. The negative value also causes the returned
offset to be outside the bounds of the text which resulted in a crash.

Bug: 19705184
Change-Id: I4287df7778c246dd10654f1a1f1e57538e940730
2015-03-12 19:24:26 +00:00
Clara Bayarri
f84a9724f1 Move the "Replace" popup option to the Text Selection ActionMode.
As a first step in unifying the cut/copy/paste ActionMode in Editor
with the paste/replace popup, I'm moving the replace option to
the CAB ActionMode. Paste is already there, so for now all options
are together.

Missing things to address in upcoming CLs:
- Invoke the ActionMode in all cases where the popup shows up now,
ensuring only the options that are currently available show up.
- Get rid of the current popup
- Make the ActionMode a floating toolbar (pending feature completion)
- Define a keyboard shortcut for replace?

Note that since the ActionMode still shows up in the ActionBar and
replace has no icon it now appears as text and takes up lots of
space. This will improve when we can switch to using a floating
toolbar.

Change-Id: Ib6b60bae9b58e4db96b9c4cee556e19d3f1bb466
2015-03-12 10:31:11 +00:00
Alan Viverette
1130363f18 Merge "Various fixes for popup monkey testing" 2015-03-11 21:04:28 +00:00
Alan Viverette
8fd949e680 Various fixes for popup monkey testing
Ensures PopupMenu works correctly when multiple calls are made to show
and dismiss. Ensure PopupWindow works correctly when multiple calls are
made to showAsDropDown and dismiss (fixes multiple clicks on Spinner).

Bug: 19672907
Bug: 19671831
Change-Id: Ib92accd8fd70a1ff1f8cda27155347b007a4d25b
2015-03-11 12:21:30 -07:00
Marco Nelissen
42f55d1e68 am a3d25d74: Merge "Fix context leak"
* commit 'a3d25d7489d7e071fb6db01b62ec9d925e1d493d':
  Fix context leak
2015-03-11 18:21:24 +00:00
Roozbeh Pournader
4cdeeadd42 Add a check for invalid spans being set by SpellChecker.
One of the exit conditions of the loop immediately above the code is
when a BreakIterator finishes its input and emits BreakIterator.DONE,
which we were then mistakenly then using as a parameter for setting
spans.

Bug: 12936072
Bug: 5555929
Change-Id: Ib4aba113f2e7838cd040076160c1dd0fb90adb1a
2015-03-11 11:09:34 -07:00
Marco Nelissen
926ebb860a Fix context leak
Using an activity context with AudioManager could cause that context
to be held on to longer than desired, for example if the caller
acquired audio focus but never abandoned it. Fix acquire/abandon in
VideoView, and use the application context in AudioManager to mitigate
the issue for other misbehaving code.

Bug: https://code.google.com/p/android/issues/detail?id=152173
Change-Id: I0fb8390207422c784800dda25b1f2c03d4574bcd
2015-03-11 10:00:28 -07:00
Chris Craik
f6829a0a61 Remove HardwareCanvas
Change-Id: I239646a7f00f09d3f76fe6b6162eed86bc0d6e77
2015-03-10 14:56:11 -07:00
James Cook
2a914cb3ae Merge "Handle undo in TextView fields with no cursor" 2015-03-10 17:42:48 +00:00
James Cook
900185d003 Handle undo in TextView fields with no cursor
This fixes a rare crash in the undo system. In particular, if the
TextView did not have a cursor and the first operation was a
programmatic insert/append the "old cursor position" would be -1.
Attempting to undo would try to restore the cursor to -1 and crash.

Test will land separately in CTS.

Bug: 19332904
Change-Id: I9aa18c1e3621b99d13ac707e483154382effb81c
2015-03-10 10:25:26 -07:00
Alan Viverette
7d6bc4f022 Merge "Revert RelativeLayout's baseline view to API 22 and below behavior" 2015-03-10 17:19:53 +00:00
Roozbeh Pournader
d1eca77c3c Merge "Fix: Drag handles are not shown for selection/insertion" 2015-03-10 01:06:03 +00:00
Alan Viverette
0e14a85768 Revert RelativeLayout's baseline view to API 22 and below behavior
The previous behavior used the top-start-most view, rather than the view
with the bottom-most baseline. Which doesn't really make sense, but
that's what it did.

Bug: 19653790
Change-Id: Ia23476f1d2de5313fd82aac037e90d45b0af8972
2015-03-09 18:01:19 -07:00
Scott Kennedy
6c4c58d6d9 Merge "Add more @Nullable annotations" 2015-03-07 01:34:49 +00:00
Scott Kennedy
ed2b5f8aca Add more @Nullable annotations
Change-Id: I5b2935eb5e63289d80ebf9bf70741800b1c0934a
2015-03-06 17:24:58 -08:00
Yigit Boyar
0c7ffe4418 Merge "Remove original movements record from GridLayout" 2015-03-07 00:09:31 +00:00