diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2011-06-13 12:16:51 -0700 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2011-06-14 16:16:39 -0700 |
commit | c0053223bedf33581b0830fb87be32c1f26e5372 (patch) | |
tree | 2ad4905ec68202ba4331f49c0efdb30d966cceeb /core/tests | |
parent | f0b517d9d287e86e6e57a372ddcb070cec1fe1c0 (diff) | |
download | frameworks_base-c0053223bedf33581b0830fb87be32c1f26e5372.zip frameworks_base-c0053223bedf33581b0830fb87be32c1f26e5372.tar.gz frameworks_base-c0053223bedf33581b0830fb87be32c1f26e5372.tar.bz2 |
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
Diffstat (limited to 'core/tests')
-rw-r--r-- | core/tests/coretests/src/android/view/GravityTest.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/tests/coretests/src/android/view/GravityTest.java b/core/tests/coretests/src/android/view/GravityTest.java index 2a7a64f..d8ef650 100644 --- a/core/tests/coretests/src/android/view/GravityTest.java +++ b/core/tests/coretests/src/android/view/GravityTest.java @@ -67,6 +67,8 @@ public class GravityTest extends AndroidTestCase { } private void assertOneGravity(int expected, int initial, boolean isRtl) { - assertEquals(expected, Gravity.getAbsoluteGravity(initial, isRtl)); + final int layoutDirection = isRtl ? View.LAYOUT_DIRECTION_RTL : View.LAYOUT_DIRECTION_LTR; + + assertEquals(expected, Gravity.getAbsoluteGravity(initial, layoutDirection)); } } |