45 Commits

Author SHA1 Message Date
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
Fabrice Di Meglio
af3e6d64d1 Update BiDiTest app
- add a default TextView

Change-Id: I0ce92503204e370d9c928440cdd4876701c6c4cb
2011-08-18 13:12:43 -07:00
Fabrice Di Meglio
f2ce877c1d Fix bug #4584320 Single Line EditText not drawing correctly with spans applied (ICS)
- use correct 0 index for computing advance thru the char buffer (the buffer is created from TextUtils.getChars())
- udpate unit tests

Change-Id: Iaeb07658b79ecdf5e17395d55afb7c84965bb0fc
2011-08-05 20:54:54 -07:00
Fabrice Di Meglio
fd0b623c33 Update BiDi unit tests
- update basic layout for having LTR and RTL TextView

Change-Id: Ic4cc6c27d431fe69bb62c55cd76a46ea6e241b4d
2011-08-05 15:04:12 -07:00
Fabrice Di Meglio
1180644280 Fix bug #4772392 Check what needs to be done for RTL specific new attributes that are in public.xml
- cleanup public.xml
- make BiDiTest makefile non visible to the build system
- provide file for injecting the new attributes by hand

Change-Id: I5037ec323066ebd254be51fff7070a5a0101dff7
2011-07-20 11:38:59 -07:00
Fabrice Di Meglio
5f9fa88268 Merge "Test Gallery layout direction." 2011-07-19 10:16:04 -07:00
Fabrice Di Meglio
c2063a5b18 Fix bug #5037425 Canvas.drawText can't handle Right-to-Left text and text composing
- optimization for single run case was broken
- pass isRTL boolean along the call stack instead of the dirFlags integer
  (which was only used as a "isRTL" in the shaper)
- update unit tests

Change-Id: I33110b76a433633a0b92fbd1db03785204e0c3e6
2011-07-18 17:47:04 -07:00
Doug Felt
3d0124f176 Test Gallery layout direction.
Change-Id: If88f559e8cc46bb72ed45f33d7fc52802f1e1246
2011-07-18 17:39:07 -07:00
Fabrice Di Meglio
c6f247ca31 Add unit tests for bug #5037425 Canvas.drawText can't handle Right-to-Left text and text composing
Change-Id: Ic71a563ad0f4ba6de5b7f030f04a3a9615b7617c
2011-07-18 15:59:10 -07:00
Fabrice Di Meglio
46c7250798 Merge "Clean test APIs for Harfbuzz support" 2011-07-18 14:26:34 -07:00
Fabrice Di Meglio
9c83011005 Merge "Fix bug #4972141 Overlapping content in single-choice dialogs" 2011-07-15 17:51:46 -07:00
Fabrice Di Meglio
796cc96243 Clean test APIs for Harfbuzz support
- also update unit tests

Change-Id: I557f61e84c4c4b6165163b783d9c679a6b3b4106
2011-07-15 17:49:22 -07:00
Fabrice Di Meglio
54d6962555 Fix bug #4972141 Overlapping content in single-choice dialogs
- need to take care about padding resolution

Change-Id: Ida9738ffada6c6455b7949f933fa61924c4f7961
2011-07-15 17:05:11 -07:00
Fabrice Di Meglio
9703ac8e6f Merge "Some code refactoring" 2011-07-15 16:52:03 -07:00
Fabrice Di Meglio
50e95eba5c Merge "Implement textDirection heuristic selection." 2011-07-15 09:49:48 -07:00
Fabrice Di Meglio
d2b5d1cf4a Some code refactoring
- make Layout.Alignment.ALIGN_LEFT as the default case
- update unit tests for reproducing bug #5002512

Change-Id: Id7ec17abd115bcda7f3434e6d64dbbba6915f108
2011-07-14 15:24:35 -07:00
Doug Felt
cb37912045 Implement textDirection heuristic selection.
Change-Id: I2fcf18de573f2d66494fa5ed61e4273c3c6078c7
2011-07-14 11:24:33 -07:00
Fabrice Di Meglio
a3b6b95f99 Introduce TextView drawableStart and drawableEnd
- update also unit tests

Change-Id: I20b82f5fea2cc48c93fd9e26eb03290ad730c08a
2011-07-12 14:04:24 -07:00
Fabrice Di Meglio
222688682e Add textDirection support for TextView and ViewGroup
- use ViewGroup inheritance if defined
- use different heuristics (inherit, firstStrong, anyRtl, ltr, rtl)
- add more unit tests

Change-Id: Ic1325aa7d9e4689b181e0a2d08b7dd7fb3f0dbeb
2011-06-28 20:29:08 -07:00
Fabrice Di Meglio
b76023afd1 Introduce MarginLayoutParams marginStart and margingEnd
- update BiDiTest app for adding more unit tests concerning margin

Change-Id: Ia6a7e0a1948a2c375e8f3cc87d120a85351a8c27
2011-06-24 18:55:24 -07:00
Doug Felt
468d8afad2 add TextView page to BiDiTests
Change-Id: If6ba2d7f96283041d254d6d53bb268d88fed2c74
2011-06-23 10:01:02 -07:00
Fabrice Di Meglio
53a73bcddf Update BiDiTest app for adding more unit tests
- add some menu that will show up in compatibility mode
- add more unit tests for padding and background drawable

Change-Id: I90db23c68d2371c35913b039a10f9d9f34c3931e
2011-06-20 17:38:41 -07:00
Fabrice Di Meglio
d8703a9824 Add View paddingStart and paddingEnd
- use a lazy padding resolution (because layout direction is lazyly resolved too)
- cache resolved layout direction as getResolvedLayoutDirection() will be more called
- enable resetting layout direction cache if needed
- update unit tests

Change-Id: I30ce19e3100cc137f84e60163b60e1577ff61819
2011-06-20 11:11:05 -07:00
Fabrice Di Meglio
b07124082e Update BiDiTest app for testing View padding
Change-Id: I7b956bd1d16cc4d27f33595f09f14f5d4e17e469
2011-06-16 16:19:59 -07:00
Fabrice Di Meglio
67f8de04fc Fix Gravity start/end
- fix missing attribute value change
- update BiDiTest app

Change-Id: I0bb8a1ebf0b6097b7b8d488580fea6e882202e23
2011-06-14 17:08:32 -07:00
Fabrice Di Meglio
c0053223be Add View.getResolvedLayoutDirection()
- update Callback2 interface
- update Gravity.getAbsoluteGravity() and Gravity.apply() to be more generic
 by changing "boolean isRtl" parameter to "int layoutDirection"
- fix BiDiTests for RTL FrameLayout

Change-Id: I97bb456c22d5fd3ecb34f08564ce4dbed37e7459
2011-06-14 16:16:39 -07:00
Fabrice Di Meglio
7af05226b9 Refactor BiDiTest unit tests app
- make it more extensible (suppress tabs in favor of a list selection and fragments)

Change-Id: If6f6c3a33f7c03e00205edbeab2945024b477f0d
2011-06-10 18:20:47 -07:00
Fabrice Di Meglio
26e432d25f Make View respect LAYOUT_DIRECTION_LOCALE
- update also unit tests for taking care of the locale direction
- code formatting on the layout test files

Change-Id: I4037eac3c572de9abb0178f36ca03803cc2c1522
2011-06-10 14:30:32 -07:00
Fabrice Di Meglio
c46f7ffa90 Rename atribute View horizontalDirection to layoutDirection and update unit tests
- update before/after to start/end in unit test app

Change-Id: Id7286ef5d9390540faf8ecd5f0b1c140d04bb364
2011-06-07 14:21:31 -07:00
Fabrice Di Meglio
de7fc15ff4 Update BiDiTest app for Gravity renaming
- BEFORE?AFTER is now START/END

Change-Id: I44cfdc17090052704024d8c5386553f0c83e9ab2
2011-06-06 17:58:17 -07:00
Fabrice Di Meglio
2f9cad27fd Update BiDiTest app
- change buttons text to follow their Gravity

Change-Id: Ie0d79ced9c14bf8b0f12d1c31da5e2fe6f162c88
2011-06-02 16:35:21 -07:00
Fabrice Di Meglio
88f9fd2316 Add more unit tests for RTL layouts
- update LinearLayout tests with default case (no horizontalDirection specified)
- add TableLayout tests

Change-Id: I9ad2239fca96b896c5aae4dfe67b8113faf2f96e
2011-06-02 10:55:58 -07:00
Fabrice Di Meglio
c715528c96 Add more unit tests cases for BiDi / RTL
- update FrameLayout tests
- add more RelativeLayout tests

Change-Id: I2ae522c5e6ec216f7ade45935f8309b543f380b9
2011-06-02 09:29:03 -07:00
Fabrice Di Meglio
c2e989021e Add more unit tests for RelativeLayout
- update BiDiTest test app

Change-Id: I8c0734fc8a94765d269b0040ebfa048c13e11728
2011-06-01 19:11:15 -07:00
Fabrice Di Meglio
77c1cc0aa4 Merge "Fix bug #4509967 (layout_gravity not always respected)" 2011-06-01 17:40:11 -07:00
Fabrice Di Meglio
de35ceeeb9 Fix bug #4509967 (layout_gravity not always respected)
- fix FrameLayout
- code refactoring on LinearLayout
- add more unit tests

Change-Id: I49302582c61aa31a4eb7eded92327b10408f71a4
2011-06-01 16:46:25 -07:00
Romain Guy
726aeba80f Add support to OpenGLRendere to draw BiDi text.
Bug #4350336

Change-Id: I1cf31693f7ca9653fa3a41b5b91c27ef288d680f
2011-06-01 14:55:42 -07:00
Amith Yamasani
405c1af756 Manual merge. Preference activity changes to work on smaller tablet screens and phones.
Padding around fragments and to the left of preference items
adjusted for different display sizes.

Change-Id: I2d29e5525c381092a3f1d2fb1265ce07db893d78
2011-05-26 15:20:14 -07:00
Fabrice Di Meglio
1e4cfbeba5 RTL Ordering of visual elements in LinearLayout
- also update unit tests for testing LinearLayout

Change-Id: I0794d48c45a8fd4a899fdf6f6a1d05485b416e1a
2011-05-20 16:23:36 -07:00
Fabrice Di Meglio
589e4e27ee Fix bug #4338103 (Android Arabic and Hebrew input is broken)
- fix glyph order when there is only a single run
- update tests

Change-Id: I113f28a8c76cab622fb75ce84bc50d1d38fa254e
2011-04-25 17:48:55 -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
Fabrice Di Meglio
689e515ed2 Add Unicode BiDi Algo before drawing text in Canvas
- only for temporary API
- update BiDiTest

Change-Id: Ifd445799dc0fda4da896246e41978cd8d71aa035
2011-04-15 19:39:47 -07:00
Fabrice Di Meglio
fcf2be1846 TextLayoutCache - add glyphs caching
- cache glyphs after Harfbuzz shaping
- use "m" prefix for member variables
- add temporary API for drawing text with glyphs
- update BiDiTest app

Change-Id: I619b3f313b15f010018daad21b3e5e486619b4e4
2011-04-08 14:37:18 -07:00
Fabrice Di Meglio
eee49c699c Fix text redering issue where the text was sometimes truncated
- mostly was visible in Settings apps / Wi-Fi networks summary info for each network
- correctly setup the local SkPaint for advances computation
- improve test app for adding live resizing

Change-Id: Ia031fe1b115b521ba55c7e68f2a26300f02e48ca
2011-03-29 19:44:33 -07:00
Fabrice Di Meglio
9f82b580d7 Use Harfbuzz instead of ICU4C for computing advances
- use Harfbuzz shaper for shaping and getting glyphs
- add test app for showing result of drawText() and drawGlyphs()
- add private API in Canvas and Paint for test app

Change-Id: Ia15be216f8636d2d864066e9b7de2f53008c30f6
2011-03-22 19:36:30 -07:00