Commit Graph

5121 Commits

Author SHA1 Message Date
James Cook
9201e79783 Add basic support for Ctrl-Z to editable TextViews
* Add an UndoManager to the Editor for each editable TextView
* Record operations as being owned by that Editor
* Parcel the undo state
* Wire hardware keyboard shortcuts Ctrl-Z for undo and Ctrl-Shift-Z
  for redo into TextView shortcut handling.
* Expose IDs for "undo" and "redo" for symmetry with cut/copy/paste.

Tests in CTS TextViewTest will land separately in ag/635321

Bug: 19332904
Change-Id: Ibd23843f86b4cd556751faa0b3ad1f35d6d49785
2015-02-19 10:32:14 -08:00
Tor Norbye
7b9c912f53 Add @ResourceInt annotations on APIs
Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
2015-02-18 07:49:03 -08:00
Alan Viverette
7a94dcfb71 am 7286d1ff: am 157c75e4: am 504c77e1: am d611fc4e: Merge "Fix year picker initial range" into lmp-mr1-dev
* commit '7286d1ff3747d3a71aeb2c8724947b35cc77d2d5':
  Fix year picker initial range
2015-02-18 00:30:15 +00:00
Alan Viverette
7286d1ff37 am 157c75e4: am 504c77e1: am d611fc4e: Merge "Fix year picker initial range" into lmp-mr1-dev
* commit '157c75e4b55d34d0426d08044130d74c2369be07':
  Fix year picker initial range
2015-02-17 22:51:53 +00:00
Alan Viverette
2a90fa6d94 Fix year picker initial range
BUG: 19410328
Change-Id: I2a2952eb58eb856f93b7af2f49e08abe71078aa9
2015-02-17 21:11:36 +00:00
Alan Viverette
ff8dbfea75 Merge "Add missing accessor to CompoundDrawable, clean up javadoc" 2015-02-13 18:51:44 +00:00
Raph Levien
8ff773a3c8 Merge "Fix EditText RenderNode invalidation bugs" 2015-02-13 18:06:14 +00:00
Raph Levien
bb2397c523 Fix EditText RenderNode invalidation bugs
EditText uses a TextDisplayList data structure to hold RenderNode
objects for optimized incremental drawing. This data structure uses an
isDirty flag to indicate when it has been invalidated and needs to be
re-rendered. This flag was not being computed correctly, leading to
excessive re-rendering.

This patch clears isDirty after rendering text into the RenderNode, so
that it can be reused until it is invalidated, and also explicitly sets
it when it is recycled.

Bug: 19371378
Change-Id: I70239cc30e43bb8631dfffc2ea2705e8d4c452f4
2015-02-12 16:29:25 -08:00
Alan Viverette
6a394f4def Add missing accessor to CompoundDrawable, clean up javadoc
Removes button resource identifier field, which was useless.

Bug: 19369976
Change-Id: I1a34cb981a2db93d10e93ff954294f76ea604006
2015-02-12 15:03:22 -08:00
Neil Fuller
a2c7884518 Merge "Remove usages of FloatMath" automerge: a8e8cdb automerge: 27316a9
automerge: c1a5e82

* commit 'c1a5e82c25dba954cf1c06729e53bfb67667bcbb':
  Remove usages of FloatMath
2015-02-12 19:29:45 +00:00
Neil Fuller
c1a5e82c25 Merge "Remove usages of FloatMath" automerge: a8e8cdb
automerge: 27316a9

* commit '27316a93e5979859ae98f506eca365784353007a':
  Remove usages of FloatMath
2015-02-12 10:00:41 +00:00
Neil Fuller
e573aa9371 Remove usages of FloatMath
Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: Iec8fb663ed54eb967050f6ff25a36ba534204c4d
2015-02-12 09:20:31 +00:00
RoboErik
bb8ed646f0 Merge "Pass the new progress when updating a ProgressBar" 2015-02-11 22:15:49 +00:00
RoboErik
5b07143e36 Pass the new progress when updating a ProgressBar
There was a race condition where the update for a progress change
from the user could pass the wrong progress value causing apps to
treat a non-user update as a user update.

bug:18515012
Change-Id: Ia62a1d07cd15f99effbf644642307c71049748f2
2015-02-11 13:52:05 -08:00
Scott Kennedy
76c382ed67 Add @Nullable to AttributeSet in a couple constructors
Change-Id: I184113680c5dc867b353df81961e93523b91bbc5
2015-02-10 23:15:39 -08:00
Jorim Jaggi
b10e33ff80 Split up android.policy into framework.jar and services.jar 1/3
Change-Id: Ifd69f1f3dd308a7e17a1442e2f3950da8b03cec4
2015-02-10 14:56:02 +01:00
Dianne Hackborn
a7bb6fbeab First quick implementation of auto assist data.
Introduce new AssistData class that contains all data
the framework automatically generates for assist.  Currently
populated with a very simple tree structure representing
the app's view hierarchy.

Reworked how we populate the class name for accessibility
info, so this is provided through a new method call on View
that subclasses can override.  This method is also used
to populate the class name in AssistData.

Change-Id: Ibd0acdc8354727d4291473283b5e4b70894905dc
2015-02-06 10:42:44 -08:00
Alan Viverette
b989c5561e resolve merge conflicts of da9653a to master.
Change-Id: I7458452389fb7b048fe5c6daa375fd4dbb9d9766
2015-02-05 17:10:47 -08:00
Alan Viverette
cbe32de454 am 9a166c7d: Merge "Mutate scroll bar drawables" into lmp-mr1-dev
automerge: 80b381c

* commit '80b381c0736c1af43801b8ed26428abdf4d437b3':
  Mutate scroll bar drawables
2015-02-06 00:53:09 +00:00
Alan Viverette
9a166c7da3 Merge "Mutate scroll bar drawables" into lmp-mr1-dev 2015-02-06 00:19:44 +00:00
Alan Viverette
f8512ce081 Mutate scroll bar drawables
Bug: 19285726
Change-Id: I4bb596433c1fa1cc4e2fa53d0cdae992f9add858
2015-02-05 15:58:56 -08:00
Alan Viverette
323d888b64 am eeb69d17: Move layer-list to be top-level element in seek bar progress automerge: bac8e12 automerge: 6708ac4
* commit 'eeb69d171b4023e92fb729bf61d566540bdd5220':
  Move layer-list to be top-level element in seek bar progress
2015-02-05 03:50:28 +00:00
Alan Viverette
eeb69d171b Move layer-list to be top-level element in seek bar progress automerge: bac8e12
automerge: 6708ac4

* commit '6708ac40f29c2437d3cb67ffa7604aecbdad1fe7':
  Move layer-list to be top-level element in seek bar progress
2015-02-05 03:45:31 +00:00
Alan Viverette
77ad055957 am c2bf7440: Merge "Allow top-level drawable container in progressDrawable" into lmp-mr1-dev automerge: 80252a9 automerge: a638c44
* commit 'c2bf7440ba9e3484d37d9c5df2ef02710682b7ed':
  Allow top-level drawable container in progressDrawable
2015-02-05 02:53:52 +00:00
Alan Viverette
c2bf7440ba Merge "Allow top-level drawable container in progressDrawable" into lmp-mr1-dev automerge: 80252a9
automerge: a638c44

* commit 'a638c44bfc6aeb4ba625b3e706a0d525bc0b2ff7':
  Allow top-level drawable container in progressDrawable
2015-02-05 02:39:32 +00:00
Alan Viverette
bac8e12ebd Move layer-list to be top-level element in seek bar progress
There is a bug in <scale>, but this works around it for now. Removes
the previous fix, which broke the initial state due to the level not
propagating when the current drawable was swapped out.

Bug: 19269656
Change-Id: Ibe586ef4ea326a7ce7516ca42a369c5386c24359
2015-02-04 17:15:01 -08:00
Alan Viverette
ae12ee34f3 Allow top-level drawable container in progressDrawable
Bug: 19269656
Change-Id: I82a49d1565f5c49320872f1489ce0f630ac85bd0
2015-02-04 16:44:02 -08:00
Alan Viverette
d7596cff0b Merge "Ensure AbsListView's drawable state reflects its actual state" 2015-02-04 00:54:14 +00:00
Alan Viverette
f723c83fe5 Ensure AbsListView's drawable state reflects its actual state
Previously, AbsListView assumed its drawable state would only be used
for the selector, so it only reflected the state of the selected child.
This didn't work so well for views that inherited from AbsListView or
for managing the scroll bar drawable state.

Change-Id: I73889645488b9a0fecbf4186b2d83d2511eccf35
2015-02-03 16:31:46 -08:00
Alan Viverette
7878edfa1d PopupWindow animation fixes
Calls the dismiss listener immediately, which fixes compatibility with
ListPopupWindow's global layout listener. Adjusts anchor bounds to
better match up with the laid out window position. Caches the content
view to avoid issues with setContentView(null) being called immediately
after dismiss().

Change-Id: I897caeba26ffb2e689f8face199d2ab70718a86c
2015-02-03 15:49:18 -08:00
Alan Viverette
ea54c0f97c Merge "Make popup transition animation play nicely with dismiss/show pair" 2015-02-03 00:12:32 +00:00
Alan Viverette
e025ed2f26 Make popup transition animation play nicely with dismiss/show pair
Previously it was okay to call dismiss/show in quick succession since
the window was removed synchronously. Adding transitions introduced a
delay between dismiss() and actually removing the window, which broke
this behavior.

Change-Id: I0de8ae0a551dcb2eb8b8a50356c308b654ebdc6f
2015-02-02 11:27:21 -08:00
Alan Viverette
96ccd39d35 Use inherited visibility to set visibility of managed drawables
Previously we only used direct visibility, which resulted in strange
behavior when a parent view with an animated child was hidden. We were
also incorrectly awakening scroll bars for non-visible views, though
that's a much less visible (pun intended) bug.

Only handles the two most common cases for ripples. A subsequent CL will
update handling of View drawable management and fix this for all managed
drawables.

Bug: 15350931
Change-Id: I0d0fe2c51210e8d2e0a73b0248cec3b93bfc36f5
2015-01-30 15:55:48 -08:00
Alan Viverette
447590524a Merge "Add accessors for switch thumb and track tinting" 2015-01-30 18:53:14 +00:00
Alan Viverette
e7eee640f8 Add accessors for switch thumb and track tinting
Bug: 19196145
Change-Id: I5c426bc8c624c75fd27faaf6e0cbef5a0594175a
2015-01-30 10:05:24 -08:00
Alan Viverette
b59041595b Merge "Add transition support to PopupWindow" 2015-01-30 18:04:48 +00:00
Raph Levien
98cb80d659 am 2ed9a7e5: am af461e12: Merge "Refine resolution order for typeface and fontFamily" into lmp-mr1-dev
automerge: 35b5780

* commit '35b5780ec52f3492ae41c36ae30e289bcf78cb11':
  Refine resolution order for typeface and fontFamily
2015-01-29 22:38:41 +00:00
Raph Levien
35b5780ec5 am 2ed9a7e5: am af461e12: Merge "Refine resolution order for typeface and fontFamily" into lmp-mr1-dev
* commit '2ed9a7e5ac3923b9459dc02b3a04e075ae4ea627':
  Refine resolution order for typeface and fontFamily
2015-01-29 22:36:46 +00:00
Raph Levien
af461e12a1 Merge "Refine resolution order for typeface and fontFamily" into lmp-mr1-dev 2015-01-29 22:11:00 +00:00
Raph Levien
42b3024efd Refine resolution order for typeface and fontFamily
Previously any fontFamily value on a TextView would override a typeface
value, even if the fontFamily is from a TextAppearance (for example,
from the theme) and the typeface is explicitly set. This patch changes
the resolution order to fontFamily set directly on the TextView,
typeface set directly on the TextView, fontFamily from TextAppearance,
typeface from TextAppearance.

Bug: 16154223
Change-Id: I45c1e511fba8f64eb236200e3fa2e885c02b59dc
2015-01-29 12:49:19 -08:00
Alan Viverette
5435a30ae5 Add transition support to PopupWindow
Allows framework-added windows to manually specify surface insets, which
enables us to wrap the popup window's elevated content view with a root
view, which in turn allows us to use the Transition API for popup window
transitions.

Fixes a bug where the root view's render node forced clipping.

Bug: 13211166
Change-Id: I303dfa55a052cdf5d3b1485422529123e3cc867a
2015-01-29 10:25:34 -08:00
Alan Viverette
4c05c4c216 Fix fallout from merging e5743753 conflicts
Change-Id: Iad16381bdf925a05e2ec609c3a5442c2a0354be9
2015-01-27 16:21:25 -08:00
Alan Viverette
d8111138ab resolve merge conflicts of e5743753 to master.
Change-Id: I83f4b6abb669963b9c4fcdf9870317e019360d46
2015-01-27 15:23:09 -08:00
Alan Viverette
d8c2af5542 Fix build
Change-Id: I134e40dbabcb9b111b3d7851a7adc247f5c92e3b
2015-01-27 13:35:14 -08:00
Alan Viverette
2a05ae733b resolve merge conflicts of da9653a to master.
Change-Id: I51a1056b36015986d7e55aa38d658b547c2446e1
2015-01-27 09:48:47 -08:00
Svetoslav
e5743753ee am 55120a0f: am 197adec3: Merge "Accessibility: Ignore overlapping siblings when computing a click location" into lmp-mr1-dev
* commit '55120a0f1acb9a46dc56bbdab877bc2c635f1356':
  Accessibility: Ignore overlapping siblings when computing a click location
2015-01-27 04:36:31 +00:00
Svetoslav
197adec365 Merge "Accessibility: Ignore overlapping siblings when computing a click location" into lmp-mr1-dev 2015-01-27 04:23:44 +00:00
Alan Viverette
da9653a263 am 8648dfe5: am 5229be05: Merge "Convert getHourForDegrees result to 12-hour format when needed" into lmp-mr1-dev
* commit '8648dfe5f52f131b0af1a17a383ce11d213cedc2':
  Convert getHourForDegrees result to 12-hour format when needed
2015-01-27 01:37:03 +00:00
Alan Viverette
5efe0d199e Convert getHourForDegrees result to 12-hour format when needed
Also prevents the selector from jumping between the inner and outer
circle during touch exploration in 24-hour mode.

Bug: 19101918
Change-Id: If342056b378927397f8651dad5e8d806bcda03a6
2015-01-26 15:34:56 -08:00
Alan Viverette
d5f35c2022 am a6b93909: am e1eff7aa: am de8d2840: Merge "Prevent drag-to-open from cycling pressed state, propagate hotspot" into lmp-mr1-dev
* commit 'a6b9390949c4aa6f7de09fd0f44bb35ed7aabbc7':
  Prevent drag-to-open from cycling pressed state, propagate hotspot
2015-01-26 19:35:44 +00:00