Commit Graph

5511 Commits

Author SHA1 Message Date
Alan Viverette
b79ac367ad am 88bba269: am d425e2d7: am 4a7bb462: Merge "Call dispatchFinishTemporaryDetach before returning a transient view" into mnc-dev
* commit '88bba269c64b1bfc2ea2ce38bf6cdd9fcd4deccb':
  Call dispatchFinishTemporaryDetach before returning a transient view
2015-06-03 22:23:58 +00:00
Alan Viverette
4a7bb4624f Merge "Call dispatchFinishTemporaryDetach before returning a transient view" into mnc-dev 2015-06-03 18:28:50 +00:00
Alan Viverette
6c413ce638 Call dispatchFinishTemporaryDetach before returning a transient view
ListView caches transient state views for reuse during layout, which calls
dispatchStartTemporaryDetach() before caching the view. This should always
be followed by a corresponding dispatchFinishTemporaryDetach() before
removing the view from the cache and returning it for reuse. While this
was the case for other types of cached views, we missed this call for
views placed in one of the two transient view caches.

Bug: 17387206
Change-Id: I360945006558b2783c098183a7cc9bc28d05d9ab
2015-06-03 10:35:44 -07:00
Alan Viverette
d03a54140d am 14d8afc6: am 4156c870: am e25f6587: Merge "API review feedback for ThemedSpinnerAdapter, Spinner" into mnc-dev
* commit '14d8afc62f8665def5daec10b6abdf8dc7d52d76':
  API review feedback for ThemedSpinnerAdapter, Spinner
2015-06-03 02:36:04 +00:00
Alan Viverette
2add9bcf8c API review feedback for ThemedSpinnerAdapter, Spinner
Moves themed interface out of Spinner and extends SpinnerAdapter, updates
Spinner constructor to take a Theme rather than a Context.

Does NOT change BaseAdapter to implement ThemedSpinnerAdapter, because
the BaseAdapter class does not have any notion of layout inflation and
that would break the contract implied by ThemedSpinnerAdapter.

Bug: 21571899
Change-Id: Id7e8d630458857ce6c93a6a8b8f920e169ee1152
2015-06-02 14:54:40 -07:00
Clara Bayarri
be850e8362 am 9ebf7522: am 8ed46d3f: am a0b77dd5: Merge "Fix TextView ActionMode overflow finishes the ActionMode" into mnc-dev
* commit '9ebf7522895589d7bc9d6508c100ef8a26d42c9f':
  Fix TextView ActionMode overflow finishes the ActionMode
2015-06-02 19:22:40 +00:00
Clara Bayarri
6ed5549cf1 am dc1630e4: am 4ebfd76a: am d63a1776: Merge "Make Text Selection Action Mode secondary items IF_ROOM" into mnc-dev
* commit 'dc1630e45334b72a337e4dcb31fce453aa0fd3e1':
  Make Text Selection Action Mode secondary items IF_ROOM
2015-06-02 19:22:34 +00:00
Jorim Jaggi
54e12e8cc0 am b17e96de: am a60e4b08: am 03a7c4c6: Fix shared drawable state
* commit 'b17e96de98f16d9322ccca7457ee9c8197b416c9':
  Fix shared drawable state
2015-06-02 19:22:15 +00:00
Alan Viverette
d584b26ae6 am 1a92fc59: am bbc27621: am b0f94ae5: Merge "Always send VIEW_CLICKED event from AdapterView.performItemClick()" into mnc-dev
* commit '1a92fc592b76519cf746b7d4f9ed2878163ebbbb':
  Always send VIEW_CLICKED event from AdapterView.performItemClick()
2015-06-02 19:21:57 +00:00
Alan Viverette
8760d9df16 am 9a5b45c1: am 49ceab84: am e0e5c1cf: Merge "Clean up AbsListView constructor" into mnc-dev
* commit '9a5b45c1e1e91f00fed6d84876a670f5278f934f':
  Clean up AbsListView constructor
2015-06-02 19:20:15 +00:00
Clara Bayarri
a0b77dd5e2 Merge "Fix TextView ActionMode overflow finishes the ActionMode" into mnc-dev 2015-06-02 01:15:50 +00:00
Clara Bayarri
d63a177670 Merge "Make Text Selection Action Mode secondary items IF_ROOM" into mnc-dev 2015-06-02 01:15:03 +00:00
Jorim Jaggi
03a7c4c6d4 Fix shared drawable state
Not calling mutate here had a side-effect making the icon in the
status bar untintable in SysUI.

Bug: 21566007
Change-Id: Ifb78c81ba7f04d496f14031ef635a6e964e6280e
2015-06-01 23:59:00 +00:00
Alan Viverette
b0f94ae5d2 Merge "Always send VIEW_CLICKED event from AdapterView.performItemClick()" into mnc-dev 2015-06-01 23:52:36 +00:00
Alan Viverette
376c32f268 Always send VIEW_CLICKED event from AdapterView.performItemClick()
This makes it consistent with View.performClick().

Bug: 19574976
Change-Id: I00b222d56aa6fac03c2e6ead0604ee2ff3a6969d
2015-06-01 16:41:42 -07:00
Alan Viverette
e0e5c1cf19 Merge "Clean up AbsListView constructor" into mnc-dev 2015-06-01 21:56:36 +00:00
Alan Viverette
3a163e29c4 am c820559a: am af3134ae: am 9be801c8: Merge "Don\'t ignore explicit dividerHeight of 0 specified in XML" into mnc-dev
* commit 'c820559a916ff4bc245b7eb15a2109c00bb6f174':
  Don't ignore explicit dividerHeight of 0 specified in XML
2015-06-01 19:04:57 +00:00
Alan Viverette
7eceda3020 Clean up AbsListView constructor
Change-Id: I5ebe0074849228e5c7fd629df6d1055c867debc8
2015-06-01 10:47:29 -07:00
Alan Viverette
7b2f86488c Don't ignore explicit dividerHeight of 0 specified in XML
Also minor cleanup and adding annotations.

Bug: 21420748
Change-Id: I89edcd3ce423ad75a4028bebf0dcd828b9619c15
2015-06-01 10:30:21 -07:00
Alan Viverette
9e1c664fab am e2fa70ea: am 8dbdd860: am db291132: Merge "Replace PNG-based seekbar thumb animation with AVD" into mnc-dev
* commit 'e2fa70eaea00ad07c39a2ce472c2df42db1c6b1c':
  Replace PNG-based seekbar thumb animation with AVD
2015-06-01 17:24:06 +00:00
James Cook
fe114c68bb am fcce03b6: am 3c668bac: am 63b6320a: Merge "assist: Fix reported colors/styles for TextView/Switch" into mnc-dev
* commit 'fcce03b6085b3faaaa2c95a6c32343be07cce2a3':
  assist: Fix reported colors/styles for TextView/Switch
2015-06-01 15:46:20 +00:00
Alan Viverette
db2911321b Merge "Replace PNG-based seekbar thumb animation with AVD" into mnc-dev 2015-05-29 22:51:04 +00:00
Alan Viverette
87e1938be8 Replace PNG-based seekbar thumb animation with AVD
Adds optical inset support for VectorDrawable and GradientDrawable.

Bug: 19944181
Change-Id: I9df04d9fe17ad858413e7f93694bf37ee2c43c85
2015-05-29 15:12:14 -07:00
Maxim Bogatov
3aa76940ed Merge "Remove AccessibilityAction.ACTION_CLICK from AbsListView." 2015-05-29 17:49:29 +00:00
James Cook
63b6320af4 Merge "assist: Fix reported colors/styles for TextView/Switch" into mnc-dev 2015-05-29 17:30:23 +00:00
Clara Bayarri
a447937dd3 Fix TextView ActionMode overflow finishes the ActionMode
stopSelectionActionMode() was called within hideCursors, and this
gets called in many scenarios. One of them is onWindowFocusChanged,
which is triggered when the user clicks the overflow icon in the
action bar. Removed the action mode call from this use case.

Bug: 21267270
Change-Id: I1cd359e87de67141627e25d2ec520fc91303a48d
2015-05-29 16:33:35 +01:00
Clara Bayarri
aee243b825 Make Text Selection Action Mode secondary items IF_ROOM
The fact that they were all ALWAYS caused the ActionBar version
of the ActionMode to show truncated text to try and fit them all.

In an ideal case we will always have a Floating ActionMode, but
the client can explicitely change this and hence we should fallback
gracefully.

Additionally, remove the SHOW_AS_ACTION_WITH_TEXT flags as we
removed the icons from the items anyway.

Bug: 21264711
Change-Id: I13a9aafd0fc6f6642d3a4a3399f71e739a1dce8d
2015-05-29 16:33:35 +01:00
Doris Liu
c2aa5584fb am 937b7ad9: am 7b554a8f: am 057d9397: Merge "Fix ScrollView\'s EdgeEffect to respect clipToPadding flag" into mnc-dev
* commit '937b7ad9f78ea10e001aca6ecbfbf0a15e0b7778':
  Fix ScrollView's EdgeEffect to respect clipToPadding flag
2015-05-28 23:00:30 +00:00
James Cook
5cfaae4aae assist: Fix reported colors/styles for TextView/Switch
Changes to the data provided to AssistStructure:
* Text foreground color is correct even if the view has not yet been
painted.
* Text background color is now always 1 (TEXT_COLOR_UNDEFINED) for a
TextView, as it has no separate concept of background color.
* Switch now reports the text size/color/style of the label text
(usually user visible) rather than the on/off text on the button
itself (usually hidden in Material, and not usually revelant when
visible).

Bug: 21080375
Change-Id: I7e15f68d89510a76cab76031c2c8ca6ca3f32435
2015-05-28 15:52:44 -07:00
Doris Liu
c81c082628 Fix ScrollView's EdgeEffect to respect clipToPadding flag
bug: 19126514
Change-Id: I21fe4fd3e2f1240ee31c51f9deac7f285ffe2408
2015-05-28 13:29:44 -07:00
Andrei Stingaceanu
a38d8ca16a am cf21bf53: am bbfacb4e: am 373816ef: Stop showing both the floating toolbar and suggestions
* commit 'cf21bf53c615c1e522c76b86f16115ffb484f688':
  Stop showing both the floating toolbar and suggestions
2015-05-28 11:28:39 +00:00
Andrei Stingaceanu
373816ef1f Stop showing both the floating toolbar and suggestions
The selection mode without selection (PASTE|SELECT_ALL)
pops up along the suggestion popup if we tap on a word
within 15sec of the most recent cut/copy/textChanged
operation. Fix this by making suggestion popup take
precedence.

Also moved the invalidation of the text changed time
into the handleTextChanged() which fixes the selection
mode starting once after the text has changed.

NOTE: Subsequent clicks on non-suggestion spans will
still trigger the selection mode without selection if
within the defined timeframe.

Bug: 20443325
Change-Id: If2726e2c965e77e82ef7b847cf352d4426205bdc
2015-05-28 11:26:28 +01:00
Maxim Bogatov
67986974c8 Remove AccessibilityAction.ACTION_CLICK from AbsListView.
AbsListView is always setClickable(true) for get clicks
and show ripple effect on clicked items. It is confusing
for accessibility because ListView has ACTION_CLICK
but does nothing important for user.

part of b/21305287

Change-Id: Ie9433a0bffcf1a469f16575a7a130ff953d80283
2015-05-27 15:35:54 -07:00
Alan Viverette
fbab247822 am bd24d2c7: am ea653eb8: am 9123e666: Merge "Update cached child enabled state before selector state" into mnc-dev
* commit 'bd24d2c73d7fb467018089b0e17198399287edac':
  Update cached child enabled state before selector state
2015-05-27 01:30:16 +00:00
Alan Viverette
9123e666bb Merge "Update cached child enabled state before selector state" into mnc-dev 2015-05-26 22:27:31 +00:00
Keisuke Kuroyanagi
81df2aa26d am b5329008: am 3e7965f7: am 1733bd3d: Merge "Fix: Insertion handle can be moved just by tapping." into mnc-dev
* commit 'b53290085ad044bfe7e24e08a1ef6c636913cc24':
  Fix: Insertion handle can be moved just by tapping.
2015-05-22 16:52:16 +00:00
Keisuke Kuroyanagi
1733bd3def Merge "Fix: Insertion handle can be moved just by tapping." into mnc-dev 2015-05-22 02:28:26 +00:00
Keisuke Kuroyanagi
7c1b0e0e62 am 2c9bb079: am 56692dd7: am 27a63612: Merge "Fix: Crash when modifying text while using drag accelerator." into mnc-dev
* commit '2c9bb079e7457fff39766e50240cc8af965ff3fb':
  Fix: Crash when modifying text while using drag accelerator.
2015-05-21 15:57:33 +00:00
Keisuke Kuroyanagi
27a6361234 Merge "Fix: Crash when modifying text while using drag accelerator." into mnc-dev 2015-05-21 04:07:57 +00:00
Mady Mellor
7367c7f074 am 1f25f1d7: am 46b70388: am b300d31b: Merge "Text selection: fix some issues with drag accelerator" into mnc-dev
* commit '1f25f1d75def8c7c65aff516a3a24c4ac3bf3fb2':
  Text selection: fix some issues with drag accelerator
2015-05-20 18:54:35 +00:00
Mady Mellor
eba9505c16 am b340eecd: am 88b07740: am 3244a663: Merge "Fix selection handles on older API versions" into mnc-dev
* commit 'b340eecd7d8a59c9a87e39df8ce7bf7455b62239':
  Fix selection handles on older API versions
2015-05-20 18:09:11 +00:00
Mady Mellor
b300d31bf1 Merge "Text selection: fix some issues with drag accelerator" into mnc-dev 2015-05-20 18:05:32 +00:00
Mady Mellor
3244a66336 Merge "Fix selection handles on older API versions" into mnc-dev 2015-05-20 17:09:13 +00:00
Mady Mellor
7a93644d5e Text selection: fix some issues with drag accelerator
Couple of overlapping issues that this CL fixes. The major change is to
offset the selection vertically this is similar to how the handles work
already (i.e. touch target is below what's being selected), and still
allows the user to see the selection start / end without covering it with
their finger.

This change fixes multiple issues:
1) Previously to ensure the finger wasn't covering the selection a
   preceding or following offset was taken, this made it difficult to
   select certain words and it made text on the edge of the screen hard
   to select (b/21098345 and b/19965619)
2) The use of preceding and following on the word iterator was not correct
   allowing grapheme clusters to be split, now the offset is calculated
   with getWordStart/End which respect grapheme clusters (b/21045116)

Bug: 21098345
Bug: 21045116
Bug: 19965619
Change-Id: Id8392426cce20ad0ff47a4279c92f6ed1b0ad30e
2015-05-20 10:05:52 -07:00
Andrei Stingaceanu
05b0e67767 am a53349dd: am 886e9478: am 8c44e745: Merge "Landscape extracted mode - floating toolbar interference" into mnc-dev
* commit 'a53349dd55cdd7592e28bc51e71c7111340337f8':
  Landscape extracted mode - floating toolbar interference
2015-05-20 13:17:58 +00:00
Andrei Stingaceanu
8c44e74524 Merge "Landscape extracted mode - floating toolbar interference" into mnc-dev 2015-05-20 09:32:50 +00:00
Andrei Stingaceanu
975a8d0f4d Landscape extracted mode - floating toolbar interference
In landscape do not allow starting selection modes if the
extracted mode has not yet started. Also remove the single
tap selection delayed runnable.

This allows for a smooth transition (as in no floating
toolbar artifacts) into extracted mode. Also fixes
(more as in hides) the double selections.

Bug: 20930071
Change-Id: Idb9c375dc25777761b11ca17ccfd9f5eedc642b4
2015-05-20 10:31:19 +01:00
Abodunrinwa Toki
bd007bd0d3 am 56546bd8: am 785c0a02: am 1f21d2a8: Merge "Hide floating toolbar when user interacts with screen." into mnc-dev
* commit '56546bd8838dd6792dd7296df4263bb1c7796ec9':
  Hide floating toolbar when user interacts with screen.
2015-05-19 14:40:44 +00:00
Abodunrinwa Toki
1f21d2a8b1 Merge "Hide floating toolbar when user interacts with screen." into mnc-dev 2015-05-19 14:06:46 +00:00
Abodunrinwa Toki
fd3a3a1163 Hide floating toolbar when user interacts with screen.
- Adds an ActionMode.snooze(int) API.
- Clients call this to hide the floating toolbar on DOWN touch event.
- This is called repeatedly as a snooze timeout will re-show the
  toolbar.
- ActionMode.snooze(0) will "wake" the toolbar, reshowing it.
- Clients call this to re-show the toolbar on UP touch event.
- This CL also adds code to hide the toolbar when the "content rect"
  is changing.

Bug: 20148125
Change-Id: If5a9a15f72c73cad8ca01a4328a58570b3e29f66
2015-05-19 14:25:39 +01:00