Commit Graph

5487 Commits

Author SHA1 Message Date
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
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
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
Clara Bayarri
d58ab0a474 am f11210a3: am 9053af6f: am e94561ec: Merge "Fix Cancelling a text action activity deletes the selected text" into mnc-dev
* commit 'f11210a36cc2550c65dd891c2ddb749f412df816':
  Fix Cancelling a text action activity deletes the selected text
2015-05-19 11:19:40 +00:00
Clara Bayarri
e94561ecbc Merge "Fix Cancelling a text action activity deletes the selected text" into mnc-dev 2015-05-19 10:42:20 +00:00
Alan Viverette
a19ab347be Update cached child enabled state before selector state
We reference the cached enabled state from the selector state update
code, so we need to ensure it is accurate first.

Bug: 20121334
Change-Id: I5859e9e8c594e1ba64ec9f001f47c2a6ea311c4f
2015-05-18 13:20:52 -07:00
Keisuke Kuroyanagi
bc89a5ce34 Fix: Insertion handle can be moved just by tapping.
Horizontal poistion is passed to updatePosition() without
adding getHorizontalOffset(). The position is wrong for the
insertion handle; thus, the handle is moved just by tapping
on it.

Bug: 20923263
Change-Id: Ie867ebd9e6b682057b73373fefb7b2baf45caef9
2015-05-18 14:49:29 +09:00
Keisuke Kuroyanagi
7127bfe92f am 7af748f2: am 4fddad17: am e20b22fe: Merge "Fix: Drag handle isn\'t updated after crossing bidi boundary." into mnc-dev
* commit '7af748f2a5348ed50c5325feef46c5a67a27efb9':
  Fix: Drag handle isn't updated after crossing bidi boundary.
2015-05-18 05:30:57 +00:00
Keisuke Kuroyanagi
259292ff3d Fix: Crash when modifying text while using drag accelerator.
Drag accelerator state was not cleared when the text was
modified; thus, mStartOffset could point to an invalid offset.

Bug: 21178876
Change-Id: Ic9b47375bab321fbc573e8a81e3fadf60309da78
2015-05-18 14:15:32 +09:00
Keisuke Kuroyanagi
e20b22feb3 Merge "Fix: Drag handle isn't updated after crossing bidi boundary." into mnc-dev 2015-05-18 04:57:09 +00:00
Keisuke Kuroyanagi
33f81ac108 Fix: Drag handle isn't updated after crossing bidi boundary.
mDrawable is updated, but it was not re-drawn properly.
postInvalidate() should be called when the drawable is
updated.

Bug: 21141841
Change-Id: Icb3ddf18d05285ffa8758a9be256482d594ab8ed
2015-05-18 13:56:06 +09:00
Alan Viverette
0164bba2f8 am d03ed00c: am b50a8b97: am 1ac88088: Merge "Return correct year in DayPickerPagerAdapter.getYearForPosition()" into mnc-dev
* commit 'd03ed00c6761d20a3581c133d8cf639c03b4d889':
  Return correct year in DayPickerPagerAdapter.getYearForPosition()
2015-05-15 22:59:47 +00:00
Mady Mellor
709386f501 Fix selection handles on older API versions
The new assets didn't have the same padding on the edges as assets on older
versions. The adjustments to the getHotspotX code for the new assets broke
how the handles on older API versions were placed.

This CL updates the assets to have the same padding (i.e. handleWidth / 2
on each side of the handle and changes the getHotspotX methods for this.

Bug: 20829391
Change-Id: If7e466d200ef7757831bc763c3c3ce4a8bbf63fc
2015-05-15 15:51:47 -07:00
Alan Viverette
bd51b4d0b9 Return correct year in DayPickerPagerAdapter.getYearForPosition()
Previously it wasn't offsetting the position by the min date's month,
so it would be off by a year if the min date wasn't in January. Also
now updates button visibility whenever the ViewPager's range changes.

Bug: 21203303
Change-Id: Id7a41a4fa48843943c744fb0fecd4bebb798cee5
2015-05-15 14:18:44 -07:00
Mady Mellor
25a339103c am 2016f97d: am e0b108cd: am 21417a0d: Merge "Text selection: Fix moving by character when should move by word" into mnc-dev
* commit '2016f97d481c7bdf85a7f4ecccb79dbafd0da325':
  Text selection: Fix moving by character when should move by word
2015-05-15 20:27:55 +00:00
Mady Mellor
de6b408b87 am 5679d2c3: am 976c683b: am c25d6c22: Merge "Fix difficulty grabbing handles for small selections" into mnc-dev
* commit '5679d2c33431ad365db76fc2b380a5992213b7c9':
  Fix difficulty grabbing handles for small selections
2015-05-15 20:27:51 +00:00
Mady Mellor
21417a0d50 Merge "Text selection: Fix moving by character when should move by word" into mnc-dev 2015-05-15 17:56:59 +00:00
Mady Mellor
c25d6c22bb Merge "Fix difficulty grabbing handles for small selections" into mnc-dev 2015-05-15 17:56:57 +00:00
Alan Viverette
64b7675c7a am 961e1304: am 8b51ce7d: am 617da41e: Merge "Update button visibility as a final step in DayPickerView construction" into mnc-dev
* commit '961e1304b915896efc75553980aa7e2675ad1743':
  Update button visibility as a final step in DayPickerView construction
2015-05-15 17:06:01 +00:00
Alan Viverette
617da41e8c Merge "Update button visibility as a final step in DayPickerView construction" into mnc-dev 2015-05-15 16:44:23 +00:00
Clara Bayarri
5b7665a1f2 Fix Cancelling a text action activity deletes the selected text
The implementation of onActivityResult in TextView did not check the
result code, hence treating the cancelled activity result as a
replacement by empty text.

Also added tests to catch this case and basic usage.

Bug: 21183019
Change-Id: Ibdafe89474dd69c5b70c67ec98fed46656f9fdcf
2015-05-15 16:32:50 +01:00
Andrei Stingaceanu
ad91a1d780 am ed146a96: am c2bdee59: am d674f230: Merge "Editor: enable double tap for selection after cut/copy." into mnc-dev
* commit 'ed146a96073ce2bbed2850c37fab46985358f259':
  Editor: enable double tap for selection after cut/copy.
2015-05-14 21:25:09 +00:00
Alan Viverette
b12172ef47 Update button visibility as a final step in DayPickerView construction
Previously it was only updated when the page was turned, but that listener
isn't called until the user turns the page.

Bug: 20701637
Change-Id: I06faf59660cda0e19d57766f4afd141e4a389b18
2015-05-14 14:24:36 -07:00
Andrei Stingaceanu
f979f5f457 am fcd68d34: am 6f885d1b: am fa660f79: Merge "Fix: text selection bubbles move along with the text" into mnc-dev
* commit 'fcd68d3487c7a5e3f6198ddfb9b9794c28eb7ef9':
  Fix: text selection bubbles move along with the text
2015-05-14 21:23:35 +00:00
Wojciech Staszkiewicz
b41aab7b5c am b8ee07d1: am e2ad30ef: am be752b1f: Merge "Pass charset to XmlPullParser.setInput instead of null" into mnc-dev
* commit 'b8ee07d10c8a8494cb658c3bc3f58f404b949db6':
  Pass charset to XmlPullParser.setInput instead of null
2015-05-14 21:23:12 +00:00
Andrei Stingaceanu
6d9d9d1cb3 am c84dfea8: am dee1479c: am c398adf8: Merge "Fix floating toolbar popping frequently after Replace/Copy" into mnc-dev
* commit 'c84dfea8f9c204edf3d2e5469a2538da88e159b2':
  Fix floating toolbar popping frequently after Replace/Copy
2015-05-14 21:23:02 +00:00
Andrei Stingaceanu
ecb7de8ee9 am 1496cdd0: am 46044e85: am 78e2f07e: Merge "Fix: replace terminates extract mode (floating toolbar)" into mnc-dev
* commit '1496cdd09d210d3f9533ee5857f44f719fe9c2e3':
  Fix: replace terminates extract mode (floating toolbar)
2015-05-14 18:05:03 +00:00