Commit Graph

2416 Commits

Author SHA1 Message Date
Gilles Debunne
6bb5fc577d am 4fec974c: am 0433c157: Merge "TextViews keep focus after Done" into ics-mr1
* commit '4fec974c2f75886516509699ccfc0100b029fe4d':
  TextViews keep focus after Done
2011-12-01 11:59:08 -08:00
Gilles Debunne
ad79297a41 am d732efa2: am b2aa672f: Merge "Revert "IME action (done, next...) correctly handled"" into ics-mr1
* commit 'd732efa2972eaaa22ff921c39744ec969598bcd0':
  Revert "IME action (done, next...) correctly handled"
2011-12-01 11:59:07 -08:00
Gilles Debunne
647944897f TextViews keep focus after Done
Otherwise the ViewRoot tries to focus something else and as a result
it will scroll back to the top of a form with many fields, which is
annoying.

Change-Id: I1de10f76fe4b82bc4097fc13c629450d6f999fd0
2011-11-30 15:45:30 -08:00
Gilles Debunne
8bfcd133a2 Revert "IME action (done, next...) correctly handled"
This reverts commit efbad5fb90.
2011-11-30 15:40:28 -08:00
Svetoslav Ganov
ddd51fdb71 am 4661a05b: am 2f504d9e: Merge "NumberPicker incorrectly shown for the old theme." into ics-mr1
* commit '4661a05bef8c98b18698202c758067ac9c965f77':
  NumberPicker incorrectly shown for the old theme.
2011-11-30 10:51:31 -08:00
Svetoslav Ganov
9f086d812f NumberPicker incorrectly shown for the old theme.
1. NumberPicker is trying to greedily grow to its max size
   but if the max size is not specified the default value
   was the max integer which makes the widget get quite
   tall in some cases. Now the widget tries to reach the
   max size only if it has been specified.

2. NumberPicker was not computing its min width when the array
   of display values is set.

3. DatePicker' layout for the old Theme was adding a margin on
   the right of the group of spinners and if the calendar view
   is not shown the spinners were not centered. Added the spinners
   right margin to the left margin of the calendar view.

4. TimePickerDialog was using the wrong conext and was not dismissable
   on an outside touch. Same for the DatePickerDialog context.

bug:5646161

Change-Id: Ic15f9b3e6291b76493604230ceb4f783a04d4ac7
2011-11-29 18:40:05 -08:00
Gilles Debunne
c273cd318d Merge "Restoring mLayout has private in TextView" 2011-11-29 10:09:25 -08:00
Gilles Debunne
e29e4d2ade am 9d8d5297: am 10232fe6: Merge "Extracted text problems" into ics-mr1
* commit '9d8d529739b1b9790599364f57cffbe022d15ee2':
  Extracted text problems
2011-11-29 10:04:01 -08:00
Gilles Debunne
6c9d4f3cd3 am 0dca407e: am 7be31bd9: Merge "IOOB in text selection." into ics-mr1
* commit '0dca407eede3d85a0185718f4993c2b09d1cc658':
  IOOB in text selection.
2011-11-29 10:01:43 -08:00
Gilles Debunne
10232fe639 Merge "Extracted text problems" into ics-mr1 2011-11-29 09:59:00 -08:00
Gilles Debunne
7be31bd96a Merge "IOOB in text selection." into ics-mr1 2011-11-29 09:56:58 -08:00
Gilles Debunne
cdfab19bf7 Restoring mLayout has private in TextView
Change-Id: If8c4385ec0b64fb2055f4561aeeb1c145294d679
2011-11-28 18:05:03 -08:00
satok
0dc1f648a0 add sentence level spell checker hidden apis
Change-Id: If65c89044bed064fd01a554e33176f64f7c21c0f
2011-11-22 09:18:12 +09:00
Gilles Debunne
1a22db2927 IOOB in text selection.
Several issues here:

1. when selection has been set to size 0 (should not be possible, but see 2.),
moving any of the selection handles will create an IOOB because we add/substract 1
with no test. Added min/max.

2. the text change detection, which stop selection mode, was done in
handleTextChanged. We need to go deeper. Some methods (such as setText())
directly call the more atomic sendOnTextChange(). Moved the test down
to this method. As a result, pressing the 'x' button in the QuickSearchBox
correctly stops selection mode (it used to leave an empty selection).

This change may also solve some weird similar issues in extracted mode where
it is sometimes possible to end up with a 0-length selection.

It may also impact Bug 5555929 since spellCheckSpans will now be correctly
updated on ANY text change.

3. the before != after test is flawed. When this method is called, the text
has been changed and selection mode should be stopped even when the new text
happens to have the same size.

Change-Id: I869ef728662f4350f22ed6149dd42db193c333ed
2011-11-20 22:25:20 +01:00
Gilles Debunne
664d87ef01 am b3272d29: am de8c5ec8: Merge "IME action (done, next...) correctly handled" into ics-mr1
* commit 'b3272d297bb45e5cd3201766baef4fef7921ce05':
  IME action (done, next...) correctly handled
2011-11-17 05:45:29 -08:00
Gilles Debunne
de8c5ec889 Merge "IME action (done, next...) correctly handled" into ics-mr1 2011-11-16 10:31:40 -08:00
Gilles Debunne
efbad5fb90 IME action (done, next...) correctly handled
Bugs 5599728 and 5319237.

mInputContentType should be set for a "modern" cupcake
environment says a comment in TextView.

However, it is possible to call onEditorAction on a
TextView that didn't use any of the method that lazily
create that field. This is for instance achieved using
the extracted mode in landscape (Done, Next actions)
or in Contacts, that feature a Next/Done button in the
IME.

As a result, the action is ignored.

The patch is to force the creation of the mInputContentType
when the EditText is associated to the IME.

Change-Id: I5beec5a52e9eec0c209af37d68791bb6ff83d6f6
2011-11-16 17:38:48 +01:00
Gilles Debunne
6ec455211b am 7bc6600e: am 8a440477: Merge "Clean-up in TextView" into ics-mr1
* commit '7bc6600e60688ea37ee7f18b82cb16677c0f5e74':
  Clean-up in TextView
2011-11-15 13:07:14 -08:00
Gilles Debunne
8a440477fd Merge "Clean-up in TextView" into ics-mr1 2011-11-15 09:59:45 -08:00
Jeff Brown
0f6ba9267f Merge "Seems to break text views all over. Particularly noticeable is that the labels in launcher icons appear left-justified. Multi-line text fields also wrap after every character." 2011-11-11 15:30:45 -08:00
Jeff Brown
033a001a61 Seems to break text views all over. Particularly noticeable is that the labels in launcher icons appear left-justified. Multi-line text fields also wrap after every character.
Revert "Fix bug #5387832 [UI/Visual] Address of the website is not displayed properly(second line of the address is partly shown)"

This reverts commit caa8c06de5
2011-11-11 15:30:16 -08:00
Christopher Tate
951aa9d8ea am 9acae658: am 847fbbea: Merge "Localized optimizations in views and bitmaps" into ics-mr1
* commit '9acae658e179796beee91d673f9f70af49ae3c9b':
  Localized optimizations in views and bitmaps
2011-11-11 14:28:55 -08:00
Christopher Tate
847fbbeaf9 Merge "Localized optimizations in views and bitmaps" into ics-mr1 2011-11-11 14:24:53 -08:00
Christopher Tate
1373a8eb58 Localized optimizations in views and bitmaps
* Don't call context.getResources() redundantly when unnecessary;
  similarly for Resources.getCompatibilityInfo()

* During bitmap creation, don't bother clearing to 0: it's unnecessary
  because now that the raw bits are stored in a VM-side byte array, it
  was cleared at initialization time.  Also, don't use the sanity-
  checking public entry point to erase to a color, because we know
  that we're by definition in a "legal" path to erase to the initial
  contents and don't need to incur the overhead of the (inappropriate)
  sanity checking.

Change-Id: Idaca4d64fdecefd5d51337646ead32e1db510e02
2011-11-11 12:46:48 -08:00
Akwasi Boateng
1333742bed am cb0db030: Merge branch \'ics-mr1-plus-aosp\' of ssh://android-git:29418/platform/frameworks/base into ics-mr1-plus-aosp
* commit 'cb0db0306b5849a35d3d99eea1b34ce019c6f0d8':
  Make the overridden ImageView#setVisibility remotable
  Clamp non-monotonic stats instead of dropping.
  DO NOT MERGE. Fix leak in LayoutTransition
  Fix lastVisible/global rects
  Fix Wimax-less build.
  Fix leak in LayoutTransition
  Deferring wallpaper update to improve workspace scrolling (issue 5506959)
  Terminate EGL when an app goes in the background
  boot animation is dithered and scaled
  Fix NdefRecord byte-stream constructor.
  PopupWindow dismiss() can get into a recursive loop.
  Fold WiMAX state into the mobile RSSI.
  Remove dedicated wimax icon to fix RSSI layout.
2011-11-11 15:34:19 +00:00
Svetoslav Ganov
d00e75e94d am 7b8bec28: Merge "PopupWindow dismiss() can get into a recursive loop." into ics-mr0
* commit '7b8bec280f20e8a5863d8214bbc195497335eba6':
  PopupWindow dismiss() can get into a recursive loop.
2011-11-11 08:02:27 +00:00
Adam Powell
b241b4c6ab Make the overridden ImageView#setVisibility remotable
Change-Id: Idaf061ea8c2a06ec8abaf74cf865446d9092afa2
2011-11-10 19:48:23 -08:00
Svetoslav Ganov
06f938e8aa PopupWindow dismiss() can get into a recursive loop.
1. The dismiss method in a PopupWindow is first removing the
   popup View from the WindowManager and then if the content
   View differs from the popup View the former is removed from
   the latter. Then dismiss() clears the dismissed flag so a
   subsequent call to dismiss() is a NOP. However, removing
   a View both from the WindowManager and from its parent
   ViewGroup triggers stuff wich may lead to a subsequent call
   to dismiss(). This leads to a stack overflow exception.

bug:5598944

Change-Id: I2aeeda591be3e9aa98fec1ee17ea8f0e746e6992
2011-11-10 14:31:41 -08:00
Adam Powell
9e71bb0b2f am aa771ceb: am 71282a47: Merge "Fix access modifiers on ImageView overrides" into ics-mr1
* commit 'aa771ceb0919f2a66ba9c927e5617d15471d70e2':
  Fix access modifiers on ImageView overrides
2011-11-10 22:20:48 +00:00
Adam Powell
6a939ae6fd Fix access modifiers on ImageView overrides
Change-Id: I64cc10c877ac4adc4b79abcd7c7617480bd82906
2011-11-10 14:11:51 -08:00
Adam Powell
5d35fd79a7 am ba44080d: am 67121fd7: Merge "Fix bug 5581874 - Animated drawables don\'t start as expected" into ics-mr1
* commit 'ba44080d834d23d0bc7d118a4950f837eeaca96a':
  Fix bug 5581874 - Animated drawables don't start as expected
2011-11-10 22:01:58 +00:00
Gilles Debunne
9704a14eeb am 2e97db49: am e5504ba1: Merge "Visual glitches when starting extracted text" into ics-mr1
* commit '2e97db4981e7773e84deee37c394748076b1aafd':
  Visual glitches when starting extracted text
2011-11-10 19:39:16 +00:00
Adam Powell
37419d7321 Fix bug 5581874 - Animated drawables don't start as expected
Fix a bug that caused animated drawables to not schedule properly when
a view has not yet been attached. Also make ImageViews update their
drawable visibility state properly, which will handle scheduling
concerns as ImageViews are attached and detached from their windows.

This should also fix the bug where animated notification icons in the
status bar do not animate until the posting app posts an update to the
notification.

Change-Id: I24c403182831258d1f251736e920c9efe1d38299
2011-11-10 11:35:12 -08:00
satok
c95b7412c2 am 3628dafe: am 34bd5969: Merge "Respect user settings for spell checking language if explicitly set" into ics-mr1
* commit '3628dafe22aeeb2fca09b49d82c8d7289baf68ad':
  Respect user settings for spell checking language if explicitly set
2011-11-10 18:34:45 +00:00
Gilles Debunne
d1cd3e7b76 Merge "Fix bug #5544127 TextView regression in ICS when setting TextSize dynamically" 2011-11-10 08:13:55 -08:00
Gilles Debunne
771d64b1e0 Clean-up in TextView
Removed some variables that are no longer needed after the
removal of context menu in TextView.

Change-Id: I6d98bb356bd7b409a5230756849aef0f2896d4c5
2011-11-10 10:15:27 +01:00
Gilles Debunne
39ba6d9c4c Extracted text problems
Bug 5557258: recent text editing changed in ExtractedText mode is
broken. The modifications of the text performed by:
- drag and drop
- text suggestions, deletion
- voice IME's delete button

all change the ExtractEditText itself, while they should affect the underlying
EditText (and the change will be forwarded to the ExtractEditText). As a results,
changes are not actually modifying the underlying text.

Created new protected methods in TextView, overloaded in ExtractTextView to
affect the underlying text instead.

Changes to spans should also be forwarded to the original TV (see the 2 TODOs),
this is tracked in bug 5589158.

Change-Id: Ibfec272469e8db191b3875e7576e32481a9dc1bd
2011-11-10 10:00:08 +01:00
Gilles Debunne
e5504ba1a2 Merge "Visual glitches when starting extracted text" into ics-mr1 2011-11-10 00:48:10 -08:00
Fabrice Di Meglio
d4c3b8e106 Fix bug #5544127 TextView regression in ICS when setting TextSize dynamically
- nullify cached font metrics when we are nullifying the layouts as a result of changing text size

Change-Id: I372e4fad336de4aac89e1344c3e8d34c4e914f2f
2011-11-09 18:12:38 -08:00
Marco Nelissen
567354474f Bug 5575396: close spell session on language change
Cherry pick change 8b67db17ec from ics-mr1

Change-Id: I8166859e435f034535510a36772644cde3923cd9
2011-11-09 16:07:33 -08:00
satok
05f2470061 Respect user settings for spell checking language if explicitly set
Bug: 5554116
Change-Id: I8c16d732af1fe713d30d97dfe829ff16653c7f34
2011-11-10 07:54:52 +09:00
Svetoslav Ganov
1002b62243 am cc03abe1: am 1bef480b: Merge "NumberPicker incorectly enforcing minimal width and height." into ics-mr1
* commit 'cc03abe1fc51a62e65f22944c3a4cba5dd3c34d3':
  NumberPicker incorectly enforcing minimal width and height.
2011-11-09 21:51:28 +00:00
Adam Powell
c31c42abb6 am 8689afbd: Merge "Fix bug 5544103 - Spinner text doesn\'t look dimmed when disabled" into ics-mr1
* commit '8689afbd63db3b1af6058709da843ea9d6433b21':
  Fix bug 5544103 - Spinner text doesn't look dimmed when disabled
2011-11-09 19:34:47 +00:00
Gilles Debunne
61ddbbae71 Visual glitches when starting extracted text
Partially addresses Bug 5547923

In landscape, tapping on the text
1. starts extracted text mode
2. displays the cursor handle or the selection popup window.

As a result, some ghost effects and race conditions create an
unpleasing visual experience.

Fixed this by not doing 2. in case extracted mode will start.

The drawback of this quicl fix is that the user will have to
tap again to get the handle/suggestion. That can be fixed later
if needed.

Change-Id: I10e1d8399bb35e5b2cd5cba1295f7d29d051cae0
2011-11-09 09:48:43 +01:00
Gilles Debunne
76bb11ca64 Merge "Bug 5575396: close spell session on language change" into ics-mr1 2011-11-09 00:26:46 -08:00
Svetoslav Ganov
1bef480b22 Merge "NumberPicker incorectly enforcing minimal width and height." into ics-mr1 2011-11-08 17:33:49 -08:00
Fabrice Di Meglio
5af447366d Merge "Fix bug #5387832 [UI/Visual] Address of the website is not displayed properly(second line of the address is partly shown)" 2011-11-08 15:55:41 -08:00
Adam Powell
8689afbd63 Merge "Fix bug 5544103 - Spinner text doesn't look dimmed when disabled" into ics-mr1 2011-11-08 10:06:00 -08:00
Adam Powell
42b7e99b11 Fix bug 5544103 - Spinner text doesn't look dimmed when disabled
Pre-Holo spinners had a far more "buttony" look that expressed the
disabled state clearly, but Holo spinners are more subtle. As a result
we want to mark the contained view representing the current item as
disabled when the spinner itself is disabled.

Express this as a private framework style attribute that cannot be
changed at runtime.

Change-Id: Icff2ef2b8a3b1a96cbf00e4c75eda41a4dada7b3
2011-11-08 09:49:21 -08:00
Gilles Debunne
c4c13f9704 am 39896f52: Merge "No more context menu in TextView" into ics-mr1
* commit '39896f52a84947ffc2062a2584033ff749d90534':
  No more context menu in TextView
2011-11-08 08:53:03 +00:00