Amith Yamasani
b724c346e1
Revert "Use a weakreference to prevent the static variable from holding an Activity."
...
Bug was fixed in a different way.
This reverts commit 352c01e213 .
2011-08-13 07:43:07 -07:00
Amith Yamasani
352c01e213
Use a weakreference to prevent the static variable from holding an Activity.
...
Bug: 5057764
Change-Id: If734e3ef4928b21a5e31e0ad50c97da287c3c116
2011-08-12 14:40:43 -07:00
Gilles Debunne
dd8f5ed79c
Added support for colored / thick underlined text.
...
Change-Id: Ib0e259dd20546855899bf091f694e41e7051fecb
2011-08-11 13:31:00 -07:00
Fabrice Di Meglio
3aa7bf7330
Merge "Fix bug #5017432 NPE when mixing different spans with different font sizes"
2011-08-09 18:35:20 -07:00
Fabrice Di Meglio
b8503eb8ac
Fix bug #5017432 NPE when mixing different spans with different font sizes
...
- fixed typo
Change-Id: I282f8bf2a72117709666e1ffc9ec8e8b5583d321
2011-08-09 18:18:27 -07:00
Fabrice Di Meglio
61ccc6a203
Merge changes I46744e51,I1f566cce
...
* changes:
Solidify and optimize Paint text related APIs
Add more optimizations for Text measuring / breaking / getting advances
2011-08-09 13:54:43 -07:00
Fabrice Di Meglio
98d29b44f7
Merge "Follow up to TextView's baseline is correctly computed for empty text"
2011-08-08 14:47:02 -07:00
Fabrice Di Meglio
15c097a1c2
Add more optimizations for Text measuring / breaking / getting advances
...
- do not go to native if this is not needed (empty or null text)
- do expandMetricsFromPaint() in TextLine when needed instead of calling handleText()
with emty string just for doing expandMetricsFromPaint()
Change-Id: I1f566ccef66cbc990ebbb77ef149899119e37e84
2011-08-08 14:42:41 -07:00
Fabrice Di Meglio
9c89d5dc82
Revert "Fix bug #5114358 If writing Numbers with Hebrew & Arabic keyboard, they appear as LTR"
...
This reverts commit 6850c7aff5
The referenced bug was actually not a bug. It was working as intended.
2011-08-08 12:17:03 -07:00
Fabrice Di Meglio
850dffa01b
Follow up to TextView's baseline is correctly computed for empty text
...
Was bug http://code.google.com/p/android/issues/detail?id=15598
- optimize https://android-git.corp.google.com/g/#/c/107901/1
Change-Id: I20abd82a97adc71f04a5afba54eb679f708236f8
2011-08-08 09:45:09 -07:00
Fabrice Di Meglio
6850c7aff5
Fix bug #5114358 If writing Numbers with Hebrew & Arabic keyboard, they appear as LTR
...
- add missing case for Arabic numbers
Change-Id: I7efe8172efee410eaafddec4a1465c1aa93a125b
2011-08-03 19:13:34 -07:00
Romain Guy
e5ea4403ce
Plug memory leak in EditText.
...
Change-Id: I0b42c23ceeaa958d02255945c35ff6807c177114
2011-08-01 14:01:37 -07:00
Kenny Root
467cabe879
Throw NullPointerException on args to Time#compare
...
Check for null on arguments to Time#compare(Time, Time) before passing
it down to JNI code.
Bug: 5073949
Change-Id: I077e9d5194a89206d1e51fc89a72c8a72e29f8f1
2011-07-25 17:00:50 -07:00
Doug Felt
cb37912045
Implement textDirection heuristic selection.
...
Change-Id: I2fcf18de573f2d66494fa5ed61e4273c3c6078c7
2011-07-14 11:24:33 -07:00
Gilles Debunne
4dacef2566
Fleshed up SuggestionSpan documentation. Bug 4553472
...
Change-Id: I3b5be9a6da79398b03d98eb33eb61a55fd702960
2011-07-08 15:24:29 -07:00
Adam Powell
7f8f79a1ff
Add ALL CAPS style to TextView/TextAppearance
...
Switch out ugly hack in action menu items for the new style.
Change-Id: I68a0ed62a352b14d499e6478b82bbc12dcb5a030
2011-07-07 20:39:41 -07:00
Doug Felt
c0ccf0c47c
Support control of text alignment.
...
Change-Id: Id6f3682f67ba2e6811e3014cd34a281e6dd0a469
2011-06-29 16:08:42 -07:00
Gilles Debunne
da188fbe4b
Merge "Fix for bug 4499752 - Detect nulled layouts in HandleViews"
2011-05-31 10:41:58 -07:00
Gilles Debunne
e8e833fbe8
Merge "Replacement spans correctly measured in TextView"
2011-05-27 16:12:19 -07:00
Gilles Debunne
d4bb0b01c6
Fix for bug 4499752 - Detect nulled layouts in HandleViews
...
Change-Id: I6a7289150bf461cdf4cca0aff4aa4a0400e0d553
2011-05-27 16:02:40 -07:00
Gilles Debunne
9a3a884864
Replacement spans correctly measured in TextView
...
Bug 4444591
Change-Id: I74c94445806d6c00b0971146cac57363c7d3f205
2011-05-27 09:34:09 -07:00
Romain Guy
bc7cdb6783
Remove extraneous log.
...
Change-Id: I91b248410d69836c7a3b56eb0867224ccb4a5336
2011-05-26 18:48:49 -07:00
satok
42c5a1666c
Fix internal variables and equals in SuggestionSpan
...
Bug: 4443922
- Instantiating other package's class for the name is complicated, so we changed the internal value for the notification target class from Class to String.
- Implement equals
Change-Id: Iaf7682be777f0027d33c9a3be4609ac01b6950ad
2011-05-26 19:21:35 +09:00
satok
f9f0100862
Add Apis to send notifications when the suggestion was picked
...
- Due to a strong request from VoiceIME
Bug: 4443922
Change-Id: Ia539de0acf66053e0349daec459d75e36805f6bf
2011-05-26 11:02:31 +09:00
Gilles Debunne
3bca69b09f
TextView uses floats for touch event positions.
...
This is the type returned by event.getX/Y methods. Conversion
to ints is only performed when needed. Low performance impact
since there is only a minimal amount of computations on these
values.
Change-Id: I53a56efe5e3a1a96911adc25fedaab7f40f1ba8e
2011-05-23 18:20:26 -07:00
Gilles Debunne
ee511cc529
SuggestionSpans are preserved when picked.
...
This is the exception case: text replacement should NOT remove SuggestionSpans
when this is the result of a Suggestion pick in the popup.
Save them and restore them after the text replacement.
Only spans that entirely englobe the replaced region make sense after the
text replacement.
Change-Id: Ib18eb6437c3a63fd0e788ebd4565c8f42e83503b
2011-05-12 15:20:30 -07:00
Conley Owens
f4c4a276e2
Merge commit 'f395e304' into m
...
Conflicts:
core/tests/coretests/src/android/text/TextUtilsTest.java
Change-Id: I7439f7f80cf91ff654c0ddd79c3e6b3808ba4784
2011-05-02 10:25:55 -07:00
Conley Owens
f395e3042a
am 19653c64: am 425db473: Merge "CHAR_SEQUENCE_CREATOR cannot handle null string"
...
* commit '19653c6440eaf7328ecbc01c3ca6d7a910906484':
CHAR_SEQUENCE_CREATOR cannot handle null string
2011-04-29 17:15:39 -07:00
Conley Owens
a02a9e602b
am 27e8f1a3: am 8b22ef66: am e41d2aed: Merge "Using robust equality check."
...
* commit '27e8f1a3a6b43592e3d419d7a3cfc6192a86bf5c':
Using robust equality check.
2011-04-29 15:11:34 -07:00
Conley Owens
1b38cc3057
am 014757ee: am a9517012: am 1e29552b: Merge "We don\'t need these local references."
...
* commit '014757eea22fc9cceede1548c579c33c79464001':
We don't need these local references.
2011-04-29 15:11:30 -07:00
Conley Owens
95b533911c
am 49df110a: am d66a92e6: am da882181: Merge "Eliminating dead code with no other effect than consuming battery life."
...
* commit '49df110aeb94ada810a8eec0540e30a25c267a56':
Eliminating dead code with no other effect than consuming battery life.
2011-04-29 15:11:26 -07:00
Conley Owens
27e8f1a3a6
am 8b22ef66: am e41d2aed: Merge "Using robust equality check."
...
* commit '8b22ef66ef1a67333e2f1d4250d2c134b50ef91a':
Using robust equality check.
2011-04-29 14:56:15 -07:00
Conley Owens
014757eea2
am a9517012: am 1e29552b: Merge "We don\'t need these local references."
...
* commit 'a95170122619f5442d5efbdf2e37f91dbf455ab9':
We don't need these local references.
2011-04-29 14:56:05 -07:00
Conley Owens
49df110aeb
am d66a92e6: am da882181: Merge "Eliminating dead code with no other effect than consuming battery life."
...
* commit 'd66a92e6875bfc835adf0b100607afbf4bfc2761':
Eliminating dead code with no other effect than consuming battery life.
2011-04-29 14:55:55 -07:00
Gilles Debunne
75beb336f4
SuggestionSpans are removed around edited text.
...
SuggestionSpans do not make sense anymore when the text they
refer to is modified. Removed these at the lowest possible common
level: In the SpannableStringBuilder that is used to back the Editable.
This way, IME do not have to care about removing these when they change
text. And they cannot forget to so either.
Also fixed a bug in TextView's paste with multi-item paste text (never
exercised, since we have no source for such a thing).
Change-Id: I08ed921f8c04ffb1a00936a3e554a85ee82f103c
2011-04-29 13:27:37 -07:00
Conley Owens
425db473a0
Merge "CHAR_SEQUENCE_CREATOR cannot handle null string"
2011-04-29 10:00:20 -07:00
Gilles Debunne
988ec4bdc8
Merge "TextView's baseline is correctly computed for empty text."
2011-04-28 15:48:05 -07:00
Gilles Debunne
f483e514d4
TextView's baseline is correctly computed for empty text.
...
Bug http://code.google.com/p/android/issues/detail?id=15598
Change-Id: I3aae29b55dc92acca3883b8d14e01dc1c79c2243
2011-04-28 15:08:57 -07:00
Conley Owens
e41d2aed9c
Merge "Using robust equality check."
2011-04-28 14:57:08 -07:00
Conley Owens
1e29552bd5
Merge "We don't need these local references."
2011-04-28 14:56:59 -07:00
Conley Owens
da88218124
Merge "Eliminating dead code with no other effect than consuming battery life."
2011-04-28 14:56:55 -07:00
Gilles Debunne
0f9ae274b4
Typo in TextAppearanceSpan documentation
...
Dim does not exist anymore.
Change-Id: I83268657accfef15561ce313b66108adc108dfc6
2011-04-27 14:25:56 -07:00
Fabrice Di Meglio
3f92b8b188
Merge "Clean getTextRunAdvances() APIs"
2011-04-22 16:54:37 -07:00
Fabrice Di Meglio
0a1413e4bf
Clean getTextRunAdvances() APIs
...
- remove ICU reference in API names
- use a "reserved" int parameter to pass either "0" for Harfbuzz or "1" for "ICU"
Change-Id: I88b4f76feafd203a6999cd7349402fa36a9a4b2a
2011-04-21 17:36:26 -07:00
Gilles Debunne
e193fd1434
Extracted WordIterator class.
...
This class will be used by TextView and the IMEs to cut the
text into words.
New getBeginning and getEnd methods that return word limits.
Added Locale to constructor.
Change-Id: Ie8ad590ebca4b48517ec7b4c3768b3e41879166e
2011-04-20 15:34:36 -07:00
Gilles Debunne
a00972ab9a
Fix around suggestionSpan.
...
Since the kind was unknown, doing a copy/cut on text with a SuggestionSpan crashed.
Change-Id: I10c0677b3587897b82c794db57d7b07149f12e09
2011-04-13 16:07:34 -07:00
Gilles Debunne
e9f05b0079
Merge "Fix in BreakIterator."
2011-04-11 16:21:38 -07:00
Gilles Debunne
daa4a95a54
Fix in BreakIterator.
...
An index equal to the length of text is indeed a valid position,
representing a cursor located after the last character.
Also changed iterator to comply to the documentation.
Change-Id: I7b9e427e4e37df20ab7e66d99053a9d8a6af6eb3
2011-04-08 11:33:23 -07:00
satok
b3fc1a5b8b
Rename CorrectionSpan to SuggestionSpan
...
Change-Id: I004b2e012b2de4de959a31da1f55b63ca7c14199
2011-04-08 13:43:19 +09:00
Martin Wallgren
cee2051ada
CHAR_SEQUENCE_CREATOR cannot handle null string
...
TextUtils.writeToParcel can handle null as input CharSequence
but createFromParcel will throw NullPointerException. Transforming
to and from parcel should handle null in the same way.
Change-Id: I707ea9be2091d2655c5f63eaa57c5674befa5ad3
2011-04-07 14:45:43 +02:00