History log of /frameworks/base/core/java/android/widget/Editor.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0ed59fae6fc85c2c4a223d3be88b79cf797908ab 30-May-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #6567507 [Bidi] - Cursor is sometimes not visible on EditText

- take the hint layout primary horizontal offset if needed

Change-Id: Ib5c4dd990278e1fd8bb9ba4f4b6940a62dba91e3
/frameworks/base/core/java/android/widget/Editor.java
057a585fba01d92c38f27a8c080622dfd0c6f556 11-May-2012 Adam Powell <adamp@google.com> Automatic persistent text selection for ListViews

Use View transient state tracking to allow selection to persist across
ListView-style item view recycling.

Fix some bugs with transient state tracking.

Bug 6110122

Change-Id: Ic084b8fc2289bff718b19478a37ce64459b3ed4c
/frameworks/base/core/java/android/widget/Editor.java
fd5bc01f70c8d9270162d38bb9f675308b5a19b0 24-Apr-2012 Gilles Debunne <debunne@google.com> Better horizontal internal scroll handling in Text.

Bug 6378843

Corrects CL 183460, which would clip text with a width greater than
twice the TextView's width.

Internal horizontal translation is now handled in a similar way to
vertical scrolling.

Internal scrolling is indeed handled by the TextView, which translates
the canvas and sets the clipping bounds accordingly.

When drawing the internal DL, we tighten the horizontal bounds like we
did for the vertical bounds using top and bottom. As in Touch.java, we
use the getHorizontallyScrolling() method to know if we indeed have to
measure the actual text width. If there is no horizontal scrolling we
use the TextView's width as a safe upper estimate in order to avoid an
actual computation. Note that horizontal scrolling is typically only
used for long single-lined text, so that the measurement loop is quick.

As a result, the internal DLs represent the entire text, and there is no
need to invalidate them when an internal scrolling takes place. This
behavior replaces the draw-only-what-is-needed we had before, but is
more consistent with what we do for long texts inside of a ScrollView
with no noticeable performance change, even on very long text.

Change-Id: I47c24c0ae988547d4f1e9f87d136225c93a3056d
/frameworks/base/core/java/android/widget/Editor.java
0b7d747e900dd9e6e6f62f10772c2dded9b9d0c6 24-Apr-2012 Gilles Debunne <debunne@google.com> Merge "Editor uses a SpanWatcher to track EasyEditSpans"
8b482446683e4908e6a71da42301291a0a399932 24-Apr-2012 Gilles Debunne <debunne@google.com> Merge "Centered text is not updated"
c62589cbecef6e748bcc6c6f4ea6a8ff7656923f 12-Apr-2012 Gilles Debunne <debunne@google.com> Editor uses a SpanWatcher to track EasyEditSpans

Will also fix Bug 6344997

The previous TextWatcher mechanism was inneficient. It require an
expensive getSpans() call to retrieve all the spans and then search
for the one we're interested in in case it has been changed.

The SpanWatcher is faster, it will broadcast the add/changed/removed
events we're interested in.

Now that we can rely on SpanWatcher, use it to directly track
addition and removals of EasyEditSpans.

No unit test for this feature which require an integration with
the voice IME. Easy to test manually though.

Change-Id: Idabcacc48c479bf9868d5204c0b0ca709207ede2
/frameworks/base/core/java/android/widget/Editor.java
fb9f5be318e4f530eff9964702cfb655a6433f00 24-Apr-2012 Gilles Debunne <debunne@google.com> Centered text is not updated

Bug 6378843

Emergency fix. May submit a proper fix with less translations later.

Change-Id: I9d8348e29d5436580202d3ee0456d341bf81dab8
/frameworks/base/core/java/android/widget/Editor.java
b983e27af47b6a3a6b13af0d3dd64b163f540efd 24-Apr-2012 Gilles Debunne <debunne@google.com> Merge "Re-added a flag to prevent the IME from showing"
1271e2cc80b01d577e9db339459ef0222bb9320d 20-Apr-2012 Chet Haase <chet@google.com> Remove USE_DISPLAY_LIST_PROPERTIES flag

This flag was still hanging around pending any need to disable
DisplayList properties. But things seem stable, so it's time to clean up
and simplify the code.

At the same time, I reduced redundance in DisplayList dimensions. We
used to call drawDisplayList() with width/height parameters that were
used to do a clip reject. This is redundant with the DisplayList properties
that set the bounds of the DisplayList; the left/right and top/bottom properties
represent the same width/height properties formerly used in drawDisplayList().
The new approach is to not pass dimensions to drawDisplayList(), but to
instead pull those dimensions directly from the DisplayList when needed.

Change-Id: I8871beff03b1d4be95f7c6e079c31a71d31e0c56
/frameworks/base/core/java/android/widget/Editor.java
de09576f4910f36f63275683870a067054d51428 23-Apr-2012 Gilles Debunne <debunne@google.com> Merge "Cursor is moved at end of word when it is added to dictionary"
3473b2b1f495f0f5a31e7ed687557c423c63abff 21-Apr-2012 Gilles Debunne <debunne@google.com> Re-added a flag to prevent the IME from showing

Revert of CL 161404

This flag will be used by the dialer. It prevents any IME from
showing as a result of a focus given to a TextView through a tap
or a D-Pad click.

Change-Id: Ifa5bfcbff124b300780f76dea443d26cf172f5e3
/frameworks/base/core/java/android/widget/Editor.java
ebc86af1dc186c77f723c8970951e8ff00b4866b 21-Apr-2012 Gilles Debunne <debunne@google.com> Visible spans changes only invalidate the affected text sub display lists

When a span with a visible influence on the text is modified, we only
need to invalidate the text sub display lists that overlap this span.

This is especially useful when typing and the composing span (an underline
span) gets updated after each key stroke.

Change-Id: Ib2af3219c41eb79ec5d0a2eee317aca8c4efdef9
/frameworks/base/core/java/android/widget/Editor.java
2eb70fb257623de7d32e8c1a878f4c03b71846d1 19-Apr-2012 Gilles Debunne <debunne@google.com> Cursor is moved at end of word when it is added to dictionary

Bug 6355904

Change-Id: Ib56b719d0c3001ce975bccf8dd80c138bffc24cc
/frameworks/base/core/java/android/widget/Editor.java
157aafcbee0eabda798a3be406ccc4200ee86756 20-Apr-2012 Gilles Debunne <debunne@google.com> TextView's sub display lists have tighten bounds

An editable TextView caches text rendering inside an adaptive
number of sub display lists. The bounds of these use to be those
of the entire View.

This CL creates block display lists with tighten bounds, so that
(a still-to-be-implemented) quick rejection can occur.

Also cleaned-up the contradictory translations that were used to
handle the TextView's internal scroll and removed the invalidation
of display lists in that case.

TODO: When internal scroll sets a tighter clipping rect, quick
reject the creation and display of the clipped display lists.

Also renamed blockEnds to a more explicit blockEndLines.

Change-Id: I7d79bea78d06d19b6935aef75ff7aa7df2594050
/frameworks/base/core/java/android/widget/Editor.java
acb69bb909d098cea284df47d794c17171d84c91 14-Apr-2012 Dianne Hackborn <hackbod@google.com> Add direct support for HTML formatted text in ClipData etc.

When using the clipboard, ACTION_SEND, etc., you can now supply
HTML formatted text as one of the representations. This is exposed
as a set of methods on ClipData for building items with HTML
formatted text, and retrieving and coercing to HTML (and styled)
text. In addtion, there is a new EXTRA_HTML_TEXT for interoperating
with the old ACTION_SEND protocol.

Change-Id: I8846520a480c8a5f829ec1e693aeebd425ac170d
/frameworks/base/core/java/android/widget/Editor.java
cfbf0e0296acd4c3451591ec4b241e393fb9bd8a 04-Apr-2012 Gilles Debunne <debunne@google.com> Removed spurious log about blinking cursor

Change-Id: I940c3847bb6e461178575480c82e7dd6739277cf
/frameworks/base/core/java/android/widget/Editor.java
d88876a72f9ceebd2c93eb9ba1be4bcff971e754 17-Mar-2012 Gilles Debunne <debunne@google.com> Extracted text editing logic in a separate class

Editor specific method and fields are extracted to a dedicated Editor class.

Some private fields and methods had to be made package private so that the
Editor can see them. No change in the public API.

Other changes in this CL:
- The Blink class no longer has a WeakReference to the TextView
- EasyEditSpanController is no longer a field of ChangeWatcher.

Future work:
remove the getEditor() method in TextView and
clean whitespaces and indentation.
remove the EasyEditSpanController as a change watcher, fix spanWatcher

Change-Id: I1fbe0176b6bd27d90f556dc3a90469367f77437c
/frameworks/base/core/java/android/widget/Editor.java