Commit Graph

5166 Commits

Author SHA1 Message Date
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
Tor Norbye
c0a1b7f9a6 Merge "Annotate ARGB integer parameters with @ColorInt" 2015-03-06 23:15:27 +00:00
Scott Kennedy
1592f98973 Merge "Allow attrs to be @Nullable in TextView and LinearLayout" 2015-03-06 18:45:25 +00:00
James Cook
f7e503de70 Merge "Support undo of some programmatic TextView changes" 2015-03-06 15:42:06 +00:00
Scott Kennedy
3a1fa10e13 Allow attrs to be @Nullable in TextView and LinearLayout
Change-Id: I46ac6cddf010e7ce59de6272c30e824104e28acb
2015-03-05 19:15:11 -08:00
Tor Norbye
80756e3888 Annotate ARGB integer parameters with @ColorInt
Change-Id: I307f72a382272cf18ddb6b07d9fcb81228568d9a
2015-03-05 16:34:12 -08:00
Yigit Boyar
38d909a57d Fix build. getAlingment should not be public
Change-Id: I4abde1ddc78367795601215106388d6eb535cbca
2015-03-05 22:40:06 +00:00
Yigit Boyar
fbd9997e68 Remove original movements record from GridLayout
Change-Id: Iebb761d0195b9d123dada1262090a71c4c175c5e
2015-03-05 22:20:12 +00:00
Yigit Boyar
6dafd87fb4 Fix some weight bugs in grid layout
This CL also changes how GONE views are considered.
Previously, they would still participate in weight calculations.
Now, they are ignored.

Bug: 19546781

Sub bugs:

Bug: 19571249
Bug: 19571653
Bug: 19571319
Bug: 19571841
Change-Id: I7344f757d3a76be98bb92660f07d2a0cafa9ac12
2015-03-05 22:01:14 +00:00
Mady Mellor
138bc2f37b Merge "Text selection changes - smart handles & drag accelerator" 2015-03-05 15:15:26 +00:00
James Cook
48e0fac6c2 Support undo of some programmatic TextView changes
Applications can use TextWatcher.afterTextChanged() to implement
post-edit formatting of text, such as inserting spaces in a credit
card number. From the user's perspective, the insertion of the spaces
is not a separate action, so that change should be merged with the
previous undo operation.

* Force merge undo states for edits that are triggered by callbacks
  after the InputFilter, such as TextWatchers.
* Reset the undo state when the whole field is reset with setText().
* Create separate undo operations for direct programmatic changes to
  the Editable (e.g. directly calling insert).
* Remove part of the non-forced replacement edit merging code. An
  improved version will land in the next CL.

Bug: 19332904
Change-Id: Iba5366a5aadbe3534554b668f8d417250deff505
2015-03-03 14:32:44 -08:00
Chris Craik
4939e2bf36 Merge "Improve docs for drawable tint and color filters" 2015-03-03 16:46:48 +00:00
Chris Craik
bd3bfc5285 Improve docs for drawable tint and color filters
bug:19564477
Change-Id: I7e11baae2d4dd245965904c85b8855de71f6b6ac
2015-03-02 16:21:02 -08:00
Alan Viverette
445e1c5ddd Merge "Improve handling of activity destroy during popup exit animation" 2015-03-02 22:24:25 +00:00
Alan Viverette
df4639a013 Improve handling of activity destroy during popup exit animation
Ensures the decor view isn't double-removed and that we don't try to
dereference a null anchor view.

Bug: 19553353
Bug: 19551371
Change-Id: I191a41f9065b68e49d66f96794cb7456f79d2d34
2015-03-02 12:40:34 -08:00
Mady Mellor
2ff2cd873c Text selection changes - smart handles & drag accelerator
Drag accelerator:
After entering text selection mode, immediately dragging your finger
along the screen will select text. Once you have dragged past the initial
word the selection an offset is added so that the end of the selection is
not below your finger.

Smart handles:
When expanding the selection the handles snap to words, when shrinking the
selection the handles go by character, once you're in by-character mode
you can expand by character until you hit a word boundary where you will
then expand by word again. Your finger must past the first ~2 characters
in a word before the handle will jump to the word boundary.

Bug: 19356160
Bug: 19355947
Change-Id: I79b8ec5ae3159148cd2f15d2e63dd5045c2069e4
2015-03-02 10:37:01 -08:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
James Cook
f1dad1ea82 Add TextView XML attribute for undo support
* Defaults to true, but can easily be changed if we decide that undo
  should be off by default.

Bug: 19332904
Change-Id: Ic4f3814a1b0a5e25171a910f2fe628606e16104e
2015-02-27 13:40:56 -08:00
James Cook
471559f129 Reland: Improvements to TextView Ctrl-Z undo support
This relands commit 7713d18847 which was
reverted in commit 3ac0bcb095.

Original description:
* Undo/redo restores cursor position
* Multiple deletes are consolidated into a single operation
* Don't create undo history for invalid or no-op operations
* Move logic for merging operations into Editor.EditOperation

CTS tests in android.widget.cts.TextViewTest will land separately.

Bug: 19332904
Bug: 19450037
Bug: 19505388
Change-Id: Ice27e3c4e5e421b47be8c4e9964c10844e61b0fc
2015-02-27 13:39:56 -08:00
James Cook
7af589995f Merge "Reland: Add basic support for Ctrl-Z to editable TextViews" 2015-02-27 20:44:45 +00:00
Alan Viverette
228fd600ce Merge "Implement landscape layout for time picker dialog" 2015-02-27 18:13:54 +00:00
James Cook
f59152cf00 Reland: Add basic support for Ctrl-Z to editable TextViews
Reland 9201e79783 which was reverted in
c8f08e07a4.

Original description:
* 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.

Additional fix:
* Ensure each UndoOwner always has a valid mManager, even after the
  UndoManager is parceled and restored.

Bug: 19332904
Bug: 19505388
Change-Id: Iad4476e6e9ca952281e69bf22c07cca915dfa7bd
2015-02-27 10:04:08 -08:00
Chris Banes
9cc36ca1b5 MenuItem, navigation and overflow icon tinting
- iconTint and iconTintMode attrs for MenuItem, with
  associated setters.
- navigationTint and navigationTintMode attrs for Toolbar
  with associated setters.
- overlflowTint and overflowTintMode attrs for Toolbar
  with associated setters.

BUG: 18126050
BUG: 19148351
BUG: 19305408

Change-Id: Ibd1fae7cdbc7a7c42809e52541fae5d8beb18e92
2015-02-27 08:56:04 +00:00
Alan Viverette
39df5fea22 Merge "Vertically center seek bar track and thumb when maxHeight is set" 2015-02-26 21:48:49 +00:00
Alan Viverette
3afd8b0d1a Vertically center seek bar track and thumb when maxHeight is set
Also removes unused tinting method from ProgressBar.

Bug: 19480491
Change-Id: I9faeff51870088c2b5ba7386dfbfd7c4898c5564
2015-02-26 13:36:28 -08:00
James Cook
14a92fe75d Merge "Revert "Add basic support for Ctrl-Z to editable TextViews"" 2015-02-26 20:34:16 +00:00
James Cook
c8f08e07a4 Revert "Add basic support for Ctrl-Z to editable TextViews"
This reverts commit 9201e79783.

It causes crashes on typing after device orientation change.

Bug: 19332904
Bug: 19505388
Change-Id: I0d9fb728eb6f8d591beb35fab333c0a182e24542
2015-02-26 12:30:04 -08:00
Brian Attwell
32e819131b Merge "QuickContacts can prioritize phone mimetype. Part1" 2015-02-26 20:19:20 +00:00
James Cook
cd2a712f1b Merge "Revert "Improvements to TextView Ctrl-Z undo support"" 2015-02-26 19:55:45 +00:00
Brian Attwell
7035f2be61 QuickContacts can prioritize phone mimetype. Part1
Define the ContactsContract for a new QuickContact extra.
This can be used to tell QuickContacts to prioritize a
given mimetype.

Bug: 18391003
Change-Id: Ie5a93ad9e1919f470a638d4235d91fe337cb5ca3
2015-02-26 11:47:25 -08:00
James Cook
3ac0bcb095 Revert "Improvements to TextView Ctrl-Z undo support"
This reverts commit 7713d18847.

It causes crashes on text input after device orientation change.

Bug: 19332904
Bug: 19450037
BUG: 19505388
2015-02-26 10:53:41 -08:00
Narayan Kamath
4a02b70aae am f1eaa123: am 4d8caa55: am 8cba382f: Merge "Bad month value in DatePicker in Calendar Mode"
* commit 'f1eaa12385e36d835e805005e9bafde67f560f20':
  Bad month value in DatePicker in Calendar Mode
2015-02-26 18:16:16 +00:00
Narayan Kamath
f1eaa12385 am 4d8caa55: am 8cba382f: Merge "Bad month value in DatePicker in Calendar Mode"
* commit '4d8caa557670626768aabb55d213f9d091433d73':
  Bad month value in DatePicker in Calendar Mode
2015-02-26 17:56:52 +00:00
Narayan Kamath
4d8caa5576 am 8cba382f: Merge "Bad month value in DatePicker in Calendar Mode"
* commit '8cba382f04e4ead4a6b8c4a74216ddb383e8db91':
  Bad month value in DatePicker in Calendar Mode
2015-02-26 17:49:19 +00:00
Alan Viverette
62c79e9a64 Implement landscape layout for time picker dialog
Adds support overriding default alert dialog panel elements by including
them in the dialog's custom content view, but no public API (yet!) since
the panel IDs have never been public. Some minor cleanup and refactoring
in TimePickerDialog. Removes Holo styles for "clock" and "calendar" style
pickers since they are new in Material. If the new styles are used against
Holo they will match Material but with Holo primary/accent colors.

Also implements themed color state lists to resolve TODOs in both time
and date pickers.

Bug: 19431361
Change-Id: I095fd8d653e02d9e5d20d66611432a08a7a5685e
2015-02-26 09:47:10 -08:00
You Kim
49e6c4adbf Bad month value in DatePicker in Calendar Mode
Calendar MONTH field is zero based. Use predefined month.

Change-Id: I957bf385dc8e877e8698dacad68808f4d9d8a6d0
2015-02-26 19:06:16 +09:00
Alan Viverette
745677f117 Merge "Clean up AlertDialog javadocs, add overlay theme for dialogs" 2015-02-26 01:36:49 +00:00
Keisuke Kuroyanagi
b103709d02 Paste as plain text by Ctrl-Shift-V
Detect Ctrl-Shft-V in onKeyShortcut() and perform paste
as plain text.

Bug: 19287899
Change-Id: I0b27bf6155222a042eeb61dfbd4544c8312904ce
2015-02-24 12:51:46 +09:00
Alan Viverette
49f118ef08 Clean up AlertDialog javadocs, add overlay theme for dialogs
Also cleans up CheckedTextView javadocs.

Bug: 19482450
Change-Id: I47559533784b19267e9381af10c456ce0d20d329
2015-02-23 17:15:27 -08:00
Alan Viverette
6a8253fdc9 Update progress bar and seek bar backgrounds, fix seek bar thumb
Ensures LayerDrawable copies out the correct layer properties during
"tileification". This really needs to be deprecated or replaced in a
future CL, though, because it is potentially lossy (e.g. for
RippleDrawable, which is an instanceof LayerDrawable).

Bug: 19448441
Change-Id: I483e9c34fd781e280c13eb5951f96bc71a252819
2015-02-23 12:49:47 -08:00
James Cook
db871da48f Merge "Improvements to TextView Ctrl-Z undo support" 2015-02-23 20:31:14 +00:00
James Cook
7713d18847 Improvements to TextView Ctrl-Z undo support
* Undo/redo restores cursor position
* Multiple deletes are consolidated into a single operation
* Don't create undo history for invalid or no-op operations
* Move logic for merging operations into Editor.EditOperation

CTS tests in android.widget.cts.TextViewTest will land separately.

Bug: 19332904
Bug: 19450037
Change-Id: I9c7887aecdd0209e783fb7cda4cb7081a97a98cd
2015-02-23 12:23:47 -08:00
Alan Viverette
adbc95f015 Update time picker to match latest Material spec
Also removes saveLayerAlpha() call from radial time picker's disabled
drawing path.

Bug: 19431361
Change-Id: I18641bb9544107bb8704fc43d0dd6c5b18ff99ce
2015-02-20 10:51:33 -08:00
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