37 Commits

Author SHA1 Message Date
Tor Norbye
a7726271f7 Replace wildcard imports with explicit imports
The wildcard imports interfered with the new typedef annotations (and
99% of the tests were using explicit imports anyway.)

Change-Id: I3784b9d700131fe4a0ba30283f052820b2fa5122
2013-09-13 14:22:36 -07:00
Fabrice Di Meglio
665f02c667 Fix bug #8437358 Clean any ICU related code from TextLayout / Paint and their dependencies
- remove the ICU related methods and update the methods using the "reserved" argument
- update to CTS in another CL too

Change-Id: I5509736568c342d9d17bfeafc17951117ab5d3cc
2013-03-20 14:56:05 -07:00
Fabrice Di Meglio
da12f389eb Revert "Clean Paint.mBidiFlags as it is no longer used"
This reverts commit 6d9fe5bd22b531bfce69b146254a4791c76acddc.
2013-03-15 11:26:56 -07:00
Fabrice Di Meglio
6d9fe5bd22 Clean Paint.mBidiFlags as it is no longer used
See bug #7623824

Change-Id: Ie2f9422821f6dcc73c99e8695f448e966b587b1d
2013-02-12 13:12:13 -08:00
Fabrice Di Meglio
9da0f8a5c4 Add View textAlignment
- fix bug #6163772
- use bits field and pack them as much as possible
- take care of "supportsRtl" flag from Manifest
- add visual unit tests

CTS unit tests in another CL

Change-Id: Ib77c4eb423854209af130688c5ef9977401a9c1c
2012-04-04 12:20:45 -07:00
Fabrice Di Meglio
0d2bda319d Update BiDiTest app for GridLayout RTL tests
- add unit tests for GridLayout in RTL mode

Change-Id: Icc983a6e2cc75b30e457fd822d81ef5630de0f10
2012-02-13 14:44:22 -08:00
Fabrice Di Meglio
2a7e7a08d9 Update BiDiTests app
- add more unit tests for GridLayout (layout created by code)

Change-Id: I462c41a7c5bdcb6c5d3762570f5d415cc0fa0bde
2012-02-09 17:32:24 -08:00
Fabrice Di Meglio
bf2ab0b80c Update BiDiTest app for adding GridLayout unit tests
- added basic GridLayout unit tests for LTR / RTL / Locale cases

Change-Id: Ied9814b2f56acb5d3666e78ad600f487ce4dc911
2012-02-06 17:20:25 -08:00
Fabrice Di Meglio
03e250aefa Fix bug #5870701 Thai text can be clipped when there are more glyphs generated than the initial number of code points
- compute total advances correctly by iterating on the advances array for up to mShaperItem.num_glyphs
- update unit tests

Change-Id: I00af68bef88702215e9222ed80dbffcc81df51a7
2012-01-13 19:49:46 -08: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
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
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
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
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
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
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
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