Commit Graph

349 Commits

Author SHA1 Message Date
Fabrice Di Meglio
d32f27aec0 Merge "Fix bug #5199577 TextView with android:password="true" is showing the "dots" on the left even if the password chars are RTL" 2011-08-26 14:05:09 -07:00
Fabrice Di Meglio
7810b5f8cf Fix bug #5199577 TextView with android:password="true" is showing the "dots" on the left even if the password chars are RTL
- force TextView to LOCALE text heuristic when in "password" mode
- remove TEXT_LAYOUT_DIRECTION_UNKNOWN_DO_NOT_USE
- LocaleUtils.getLayoutDirectionFromLocale() returns "LTR" is locale is NULL or ROOT

Change-Id: I182c46aaf2d73c8b18967fffa230bfabec91ed06
2011-08-25 18:43:37 -07:00
Gilles Debunne
6435a56a8c Spell checking in TextViews
New UX interactions (the Paste action is no longer displayed after a delay)
suggestionEnabled flag replaced by existing input type flag.
removeSpans fixed in SpannableStringBuilder to always send notifications
SuggestionSpan handled by TextView instead of SpannableStringBuilder

New span update algorithm to correctly handle edition around word boundaries.

Change-Id: I52c01172f19e595fa512e285a565a3fd97c3c50e
2011-08-23 13:13:54 -07:00
Fabrice Di Meglio
c2d256b415 Merge "Improve TextDirection resolution" 2011-08-22 16:24:43 -07:00
Fabrice Di Meglio
a646145c33 Improve TextDirection resolution
- remove unuseful heuristics
- tune Javadoc

Change-Id: Id72a158b3a17a528423d278b1cbfd95b8c2951b5
2011-08-19 16:19:37 -07:00
Jeff Sharkey
1666dc6041 Merge "Combine list of CharSequence with delimeter." 2011-08-17 18:12:07 -07:00
Fabrice Di Meglio
3de510313a Merge "Fix bug #5175022 Easy mode in MeasuredText.setPara() is no more used" 2011-08-17 17:30:46 -07:00
Fabrice Di Meglio
4b60c30838 Fix bug #5175022 Easy mode in MeasuredText.setPara() is no more used
- use the real TextDirectionHeuristics constants
- make more formal that LayoutDirection should be resolved BEFORE TextDirection
- reset TextDirection if LayoutDirection is recomputed
- remove non used TextDirectionHeuristic.isRtl(CharSequence...)

Change-Id: I1d53a7e3ee324cfd27785bb4d715d93de8d9ff4d
2011-08-17 17:15:12 -07:00
Jeff Sharkey
fa4d7754ed Combine list of CharSequence with delimeter.
Change-Id: I7d86b89a84f6d91e5441c8af63310b37f16974fc
2011-08-17 15:49:30 -07:00
Gilles Debunne
4cee03a85f Merge "Change the behavior of SuggestionSpan." 2011-08-16 13:23:25 -07:00
Luca Zanolin
7d1c55fad8 Change the behavior of SuggestionSpan.
SuggestionSpan can be accessed in two different ways:

- by tapping on the text (easy access)
- by tapping on "replace" pop-up (not easy and difficult to discover)

The "easy access" will be used for dictionary suggestions and voice recognition suggestions.

The suggestion span can be rendered into two different way:

- default, text is underlined in blue
- spelling error, text is underlined in red

Change-Id: I0af0fe6700d0ad588facb21c021dc6f59ef172f1
2011-08-16 10:42:45 -07:00
Fabrice Di Meglio
8059e0903e Fix bug #3388534 Long file names are improperly displayed when played
- force ellipsising when there are more lines found than maxLines
- do not care about lines when we have reached maxLines
- also fix relayouting when changing maxLines thru setMaxLines()
- do not allow START / MIDDLE ellipsis when there are multiple lines
(and print a log accordingly)

Change-Id: I90f5a7f5200a220aceee01fb7300bec2c4c3a075
2011-08-15 13:18:34 -07:00
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