Commit Graph

6055 Commits

Author SHA1 Message Date
Siyamed Sinir
4ba0aa598e TextView setText/append methods set movement method
Previously, TextView setText and append methods set the movement
method to LinkMovementMethod only when autoLink was enabled and
Linkify was able to find links in the input text. This CL adds the
case where autoLink is false, linksClickable is true, and the input
text contains ClickableSpans.

Fixes https://code.google.com/p/android/issues/detail?id=2219

Bug: 1712837
Change-Id: Ife4e35bac7f6cb48ad0dac6ecb4b90aec126fc73
2015-11-17 17:56:03 -08:00
Alan Viverette
1ca1860f97 Merge "Clean up PopupMenu" 2015-11-16 22:24:29 +00:00
Alan Viverette
7323810898 Clean up PopupMenu
No functional changes, only refactoring:
- remove unused mShowCascadingMenus member variable
- move private interface implementations to anonymous inner classes
- move interfaces to end of class
- clean up docs formatting

Change-Id: Ib82ca0d3a3ff49207959a17b77c4ff4f11a1afc2
2015-11-16 16:55:58 -05:00
Alan Viverette
4420ae875d Clean up TimePicker
No functional changes, only refactoring:
- shorten method and variable names
- remove unused validation callback
- avoid using return in setters

Change-Id: Ie7c19cfe3c5cb515695f943c534899d37ad032bb
2015-11-16 16:10:56 -05:00
Siyamed Sinir
a0db63f6ef TextView.append() honors autoLink attribute
The append() method now checks if autoLink is set and adds the
URLSpans to given text before appending to the existing text.

Fixes https://code.google.com/p/android/issues/detail?id=1244
Fixes https://code.google.com/p/android/issues/detail?id=191353

Bug: 1404366
Bug: 25222125
Change-Id: I47a8beec9799e4f92ce266ceed41a634b7f7cc96
2015-11-12 15:25:31 -08:00
Seigo Nonaka
a17d8766d4 Merge "Clear suggestionSpan reference once popup window is closing." 2015-11-12 06:55:34 +00:00
Svetoslav Ganov
d07d7aff0b Merge "Add the set_test a11y action to EditText's action list" 2015-11-11 18:41:37 +00:00
George Mount
0af35b44f7 Merge "Improve DatePicker focus for keyboards." 2015-11-11 15:33:00 +00:00
Keisuke Kuroyanagi
6b814d8aed Merge "Use constants for return value of TextView#doKeyDown" 2015-11-11 02:35:18 +00:00
Keisuke Kuroyanagi
a08a48cb98 Merge "Support KEYCODE_{CUT, COPY, PASTE} in TextView." 2015-11-10 07:46:51 +00:00
Svetoslav
f4b1adad9c Add the set_test a11y action to EditText's action list
bug:25486055

Change-Id: Ibbc8acbc98d38e903bc65b4032ca12de7c50ba62
2015-11-09 19:59:23 +00:00
George Mount
e998c3f5f6 Improve DatePicker focus for keyboards.
Bug 24873983

Focus moves properly within the SimpleMonthView and between
components of the DatePicker.

Change-Id: I61778f9b4f19536ff6c7a512f9b4faf7bf4447a7
2015-11-06 15:48:52 -08:00
Alan Viverette
00aa5103e2 Reduce CascadingMenuPopup's reliance on internal ListView state
Bundles cascading menu information and stores it in a stack representing
the hierarchy of added menus.

Bug: 23970448
Change-Id: I1621d9eb30ff173767b6ebad2a1977127c42d0ad
2015-11-03 13:03:15 -05:00
Keisuke Kuroyanagi
2b46e657f9 Use constants for return value of TextView#doKeyDown
-1, 0, 1, and 2 were directly used for the return value of
TextView@doKeyDown. It's very hard to understand what each
value means.

Change-Id: I88dad15e2b68f652c8479a01f9f241c6638b5284
2015-10-30 15:56:33 +09:00
Keisuke Kuroyanagi
b3163ed118 Support KEYCODE_{CUT, COPY, PASTE} in TextView.
Bug: 25292652
Change-Id: I8e2c1986e45d9bfd09ab54dea6d2e3701f76df18
2015-10-28 14:27:00 +09:00
Alan Viverette
b3f2463990 Implement new keyboard interaction model in TimePicker
Also enlarges the touch targets for the AM/PM buttons by redirecting
unhandled touches within the containing view group.

Bug: 20257430
Change-Id: I28e8d8894a4702116bb68cc6a6d4115e5aa87a69
2015-10-22 16:01:48 -04:00
Yoshiki Iguchi
e0ee5d9657 Fix crash on calling removeSelection with showing selection handlers am: 9582e15196 am: 6649ee972b am: 6a5bb1534c
am: fb8343549a

* commit 'fb8343549a65bf65dab0fce6830b1b39ce62ddaa':
  Fix crash on calling removeSelection with showing selection handlers
2015-10-22 07:53:41 +00:00
Yoshiki Iguchi
fb8343549a Fix crash on calling removeSelection with showing selection handlers am: 9582e15196 am: 6649ee972b
am: 6a5bb1534c

* commit '6a5bb1534c736c21260c5c488ff58e4d81972f92':
  Fix crash on calling removeSelection with showing selection handlers
2015-10-22 07:49:00 +00:00
Yoshiki Iguchi
6649ee972b Fix crash on calling removeSelection with showing selection handlers
am: 9582e15196

* commit '9582e151964be60457d4abd712857fb1e8a4586d':
  Fix crash on calling removeSelection with showing selection handlers
2015-10-22 07:39:17 +00:00
Yoshiki Iguchi
9582e15196 Fix crash on calling removeSelection with showing selection handlers
A crash occured on updating after calling removeSelection with showing
selection handlers. This was because some selection-handler code didn't
consider the case the selection index was -1 (-1 means there is no selection).
This patch fixes this crash.

Bug: 23299977
Change-Id: I736d315e073f773aec597522203015205a8da42b
2015-10-22 07:28:47 +00:00
Andrei Stingaceanu
fa7834379f Merge "Fix toolbar flickering in ExtractedMode when longpressing." into mnc-dr-dev am: ee4ab0a55b am: 24fc647e70 am: 509a74972a
am: fe622345b0

* commit 'fe622345b02656b9e049dde9936987f38984e97d':
  Fix toolbar flickering in ExtractedMode when longpressing.
2015-10-21 17:11:52 +00:00
Andrei Stingaceanu
fe622345b0 Merge "Fix toolbar flickering in ExtractedMode when longpressing." into mnc-dr-dev am: ee4ab0a55b am: 24fc647e70
am: 509a74972a

* commit '509a74972af13c845a67ad9edddd8e413cc7884a':
  Fix toolbar flickering in ExtractedMode when longpressing.
2015-10-21 16:55:37 +00:00
Andrei Stingaceanu
24fc647e70 Merge "Fix toolbar flickering in ExtractedMode when longpressing." into mnc-dr-dev
am: ee4ab0a55b

* commit 'ee4ab0a55b355b21168de0eb5615f2e321c2982f':
  Fix toolbar flickering in ExtractedMode when longpressing.
2015-10-21 16:03:52 +00:00
Andrei Stingaceanu
ee4ab0a55b Merge "Fix toolbar flickering in ExtractedMode when longpressing." into mnc-dr-dev 2015-10-21 15:56:26 +00:00
Andrei Stingaceanu
2aaeefec92 Fix toolbar flickering in ExtractedMode when longpressing.
onPreDraw starts an action mode in extract mode only which
does not consider the type of motion event and since extracted
mode never gets the focus event it never hides so it does not
need to show again.

Stop starting an action mode onPreDraw in extracted mode and
let the onTouchEvent handle starting the mode.

Also re-enabled dragging and dropping for ExtractedMode (most
of the issues were caused by starting the action mode
onPreDraw).

Bug: 25102276
Change-Id: I90d8e9f42f395b6b529e4d023ba6939e0dfb147f
2015-10-21 15:42:00 +01:00
John Reck
075f9ce097 Merge "Fix a few view ctors to not call Looper.myLooper" 2015-10-21 14:25:47 +00:00
Abodunrinwa Toki
c8d8288832 Merge "Re-set PROCESS_TEXT selection if nothing was returned." into mnc-dr-dev am: 3bd3655fd0 am: 9e97c20ed9 am: 0eef4ab567
am: 4d14e65cdf

* commit '4d14e65cdf968ba43e47fe79e7b6d7e62d8b2ed1':
  Re-set PROCESS_TEXT selection if nothing was returned.
2015-10-20 23:48:20 +00:00
Alan Viverette
4fa91b18b6 Merge "Update drawable matrix when bounds change in invalidateDrawable()" into mnc-dr-dev am: 840f38905c am: e3d745291e am: c3e46adc77
am: 27c5cbe5a8

* commit '27c5cbe5a87e618f7f8eafce90559525f4c2d70b':
  Update drawable matrix when bounds change in invalidateDrawable()
2015-10-20 23:04:11 +00:00
Alan Viverette
e21329ad86 Merge "DO NOT MERGE Use correct param for heightMode in RelativeLayout horizontal measure" into mnc-dr-dev am: 4823493647 am: ac02be311d
am: 41707942a8

* commit '41707942a8aea8c9122482f28f2fd599e55d0791':
  DO NOT MERGE Use correct param for heightMode in RelativeLayout horizontal measure
2015-10-20 22:27:25 +00:00
Alan Viverette
ac02be311d Merge "DO NOT MERGE Use correct param for heightMode in RelativeLayout horizontal measure" into mnc-dr-dev
am: 4823493647

* commit '482349364715dfcd87dc83e0913fc60dc6df0497':
  DO NOT MERGE Use correct param for heightMode in RelativeLayout horizontal measure
2015-10-20 21:56:40 +00:00
Alan Viverette
4823493647 Merge "DO NOT MERGE Use correct param for heightMode in RelativeLayout horizontal measure" into mnc-dr-dev 2015-10-20 21:44:35 +00:00
Alan Viverette
b5817779a9 DO NOT MERGE Use correct param for heightMode in RelativeLayout horizontal measure
Bug: 22824701
Bug: 25107144
Change-Id: Ia0afd3edc20b8127605aef2653fa9b5472f41be2
(cherry picked from commit 130ce740d1)
2015-10-20 17:29:39 -04:00
John Reck
d0374c6b25 Fix a few view ctors to not call Looper.myLooper
Bug: 25116730
Change-Id: I4e394c281feef6f7987433298d66f2df11352416
2015-10-20 14:20:33 -07:00
Abodunrinwa Toki
4d14e65cdf Merge "Re-set PROCESS_TEXT selection if nothing was returned." into mnc-dr-dev am: 3bd3655fd0 am: 9e97c20ed9
am: 0eef4ab567

* commit '0eef4ab5678f9f3eaecd74b5e00990cef5b8d967':
  Re-set PROCESS_TEXT selection if nothing was returned.
2015-10-20 18:51:03 +00:00
Alan Viverette
27c5cbe5a8 Merge "Update drawable matrix when bounds change in invalidateDrawable()" into mnc-dr-dev am: 840f38905c am: e3d745291e
am: c3e46adc77

* commit 'c3e46adc7797b4e894ef1e8ffd972acddb8fbbfa':
  Update drawable matrix when bounds change in invalidateDrawable()
2015-10-20 18:27:41 +00:00
Abodunrinwa Toki
9e97c20ed9 Merge "Re-set PROCESS_TEXT selection if nothing was returned." into mnc-dr-dev
am: 3bd3655fd0

* commit '3bd3655fd05a548f6e60cfccd4185a4b9ae2a7d6':
  Re-set PROCESS_TEXT selection if nothing was returned.
2015-10-20 18:06:44 +00:00
Abodunrinwa Toki
3bd3655fd0 Merge "Re-set PROCESS_TEXT selection if nothing was returned." into mnc-dr-dev 2015-10-20 17:47:28 +00:00
Alan Viverette
e3d745291e Merge "Update drawable matrix when bounds change in invalidateDrawable()" into mnc-dr-dev
am: 840f38905c

* commit '840f38905c073044077cb2bef68d20971f5d3d39':
  Update drawable matrix when bounds change in invalidateDrawable()
2015-10-20 17:24:45 +00:00
Abodunrinwa Toki
3b8a5ea036 Re-set PROCESS_TEXT selection if nothing was returned.
Bug: 25043887
Change-Id: If069a5e23f1adf6a2c3aac8fe7e3f19cff2e28ad
2015-10-20 17:11:26 +01:00
Alan Viverette
01320de844 Update drawable matrix when bounds change in invalidateDrawable()
Bug: 24797872
Change-Id: Ib2bcce6f7d6fab33633a915882821b00d94e4e44
2015-10-20 13:51:21 +00:00
Chris Craik
003cc3dec8 Rename DisplayListData to DisplayList
Change-Id: I25f6bb88ffdf9baf7e8e4e2a294aa8c9d2a4605b
2015-10-16 10:38:34 -07:00
Seigo Nonaka
7afa67ca22 Clear suggestionSpan reference once popup window is closing.
Clear suggestionSpan reference since it is not necessary once the
suggestion window is closed.

suggestionSpan is kept for identifying the target text region in
onItemClick method.

This CL is a part of groundwork for Bug 15347319 and no user visible
change is intended with this CL.

Change-Id: Ie0edf215a1b90629e280ce09df4fd6f5d95fbb06
2015-10-15 19:11:50 +09:00
Jun Mukai
1db5397d88 Allow changing mouse pointer icon for the current context.
Right now, it only supports I-beam on EditText, but further
rules will come in the future.

The png files for the icons are from chromium.

Bug: 24180385
Change-Id: I8de4ec8a5412b4830c08aa232c5083841c5c751c
2015-10-15 01:47:29 -07:00
Alan Viverette
1aba36d721 Merge "Revert "Reduce CascadingMenuPopup's reliance on internal ListView state"" 2015-10-08 19:54:49 +00:00
Alan Viverette
2ac975deb3 Revert "Reduce CascadingMenuPopup's reliance on internal ListView state"
Introduced some regressions. Reverting until we can do better testing.

This reverts commit 8375d63998.

Change-Id: I9b15d63e52c814ef8985b86f8a50359e39355d39
2015-10-08 19:54:16 +00:00
Alan Viverette
4e91907bf8 am 8a0c8e78: am 6a06f12c: Merge "Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams"
* commit '8a0c8e78a7d938288e065b21e78b2de6097b1599':
  Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams
2015-10-07 16:43:11 +00:00
Alan Viverette
3a3fea4fed am 4524278b: am 7de6ae15: Merge "To call TypedArray.recycle() when we are done with the array."
* commit '4524278bcb948196e8a9bfff69a566fce1fdc794':
  To call TypedArray.recycle() when we are done with the array.
2015-10-07 16:43:00 +00:00
Alan Viverette
8a0c8e78a7 am 6a06f12c: Merge "Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams"
* commit '6a06f12c3fa6a84306dc17f60eb16cdc25bc34b5':
  Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams
2015-10-07 16:34:35 +00:00
Alan Viverette
4524278bcb am 7de6ae15: Merge "To call TypedArray.recycle() when we are done with the array."
* commit '7de6ae159e0652cabe57ea8814ce8633049644a2':
  To call TypedArray.recycle() when we are done with the array.
2015-10-07 16:34:26 +00:00
Alan Viverette
6a06f12c3f Merge "Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams" 2015-10-07 16:23:36 +00:00