summaryrefslogtreecommitdiffstats
path: root/tests/GridLayoutTest
diff options
context:
space:
mode:
authorPhilip Milne <pmilne@google.com>2012-09-19 18:13:44 -0700
committerPhilip Milne <pmilne@google.com>2012-09-21 13:48:40 -0700
commit7b7578184567f4e4f0740ce935cc192765410cca (patch)
tree481b803ceb22262b36810cac3f31112527eeda12 /tests/GridLayoutTest
parent93941683c22d12ad88c0b442f9d00e20a351f15a (diff)
downloadframeworks_base-7b7578184567f4e4f0740ce935cc192765410cca.zip
frameworks_base-7b7578184567f4e4f0740ce935cc192765410cca.tar.gz
frameworks_base-7b7578184567f4e4f0740ce935cc192765410cca.tar.bz2
Bug #6110465. Optical bounds support for all ViewGroup subclasses.
This CL generalizes the optical bounds support previously contained in the GridLayout implementation and then incorporates the new form directly into the base View and ViewGroup implementations. After this change, GridLayout is returned to an 'optical bounds' unaware state, and all layouts (including non-platform ones) inherit the ability to perform their layout operation by optical (rather than clip) bounds using their existing implementations. The "layoutMode" property of ViewGroup and its associated constants are made public in this CL. Change-Id: Ic1bba0e1c6fc14da4aeab0b28c975d562b5f82dd
Diffstat (limited to 'tests/GridLayoutTest')
-rw-r--r--tests/GridLayoutTest/src/com/android/test/layout/LayoutInsetsTest.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/GridLayoutTest/src/com/android/test/layout/LayoutInsetsTest.java b/tests/GridLayoutTest/src/com/android/test/layout/LayoutInsetsTest.java
index 103de2f..81440a5 100644
--- a/tests/GridLayoutTest/src/com/android/test/layout/LayoutInsetsTest.java
+++ b/tests/GridLayoutTest/src/com/android/test/layout/LayoutInsetsTest.java
@@ -10,9 +10,8 @@ import android.widget.Button;
import android.widget.GridLayout;
import android.widget.TextView;
-import static android.widget.GridLayout.ALIGN_BOUNDS;
import static android.widget.GridLayout.LayoutParams;
-import static android.widget.GridLayout.OPTICAL_BOUNDS;
+import static android.widget.GridLayout.LAYOUT_MODE_OPTICAL_BOUNDS;
public class LayoutInsetsTest extends Activity {
static int[] GRAVITIES = {Gravity.LEFT, Gravity.LEFT, Gravity.CENTER_HORIZONTAL, Gravity.RIGHT, Gravity.RIGHT};
@@ -23,7 +22,7 @@ public class LayoutInsetsTest extends Activity {
GridLayout p = new GridLayout(context);
p.setUseDefaultMargins(true);
//p.setAlignmentMode(ALIGN_BOUNDS);
- p.setLayoutMode(OPTICAL_BOUNDS);
+ p.setLayoutMode(LAYOUT_MODE_OPTICAL_BOUNDS);
p.setColumnCount(N);