summaryrefslogtreecommitdiffstats
path: root/tests/GridLayoutTest
diff options
context:
space:
mode:
authorPhilip Milne <pmilne@google.com>2011-06-29 11:09:45 -0700
committerPhilip Milne <pmilne@google.com>2011-07-01 11:08:19 -0700
commit48b55244d286b6d4e3699a5d9e938a9c87aaae75 (patch)
treee17d0c267f99ada221ec2b3eaf4a507e4a911a8b /tests/GridLayoutTest
parent748d9f2fe4db14d1f0f140a92ff7e6cc27dcd732 (diff)
downloadframeworks_base-48b55244d286b6d4e3699a5d9e938a9c87aaae75.zip
frameworks_base-48b55244d286b6d4e3699a5d9e938a9c87aaae75.tar.gz
frameworks_base-48b55244d286b6d4e3699a5d9e938a9c87aaae75.tar.bz2
Support for maximum values in layout GridLayout.
A cell's ability to shrink or stretch is now integrated with the constraints system, which is now supplied with both upper and lower bounds. Also: . Remove package private access (pseudo) annotation . Remove rowWeight and columnWeight attributes and fields . Remove code to handle weights Change-Id: I9e2432101d15466c621f51ae362435051fab5764
Diffstat (limited to 'tests/GridLayoutTest')
-rw-r--r--tests/GridLayoutTest/res/layout/grid3.xml4
-rw-r--r--tests/GridLayoutTest/src/com/android/test/layout/Activity2.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/GridLayoutTest/res/layout/grid3.xml b/tests/GridLayoutTest/res/layout/grid3.xml
index ba911c2..536be7e 100644
--- a/tests/GridLayoutTest/res/layout/grid3.xml
+++ b/tests/GridLayoutTest/res/layout/grid3.xml
@@ -66,8 +66,8 @@
<Space
android:layout_row="4"
android:layout_column="2"
- android:layout_rowWeight="1"
- android:layout_columnWeight="1"
+ android:layout_heightSpec="canStretch"
+ android:layout_widthSpec="canStretch"
/>
<Button
diff --git a/tests/GridLayoutTest/src/com/android/test/layout/Activity2.java b/tests/GridLayoutTest/src/com/android/test/layout/Activity2.java
index e010a00..cba98c2 100644
--- a/tests/GridLayoutTest/src/com/android/test/layout/Activity2.java
+++ b/tests/GridLayoutTest/src/com/android/test/layout/Activity2.java
@@ -97,8 +97,8 @@ public class Activity2 extends Activity {
Space v = new Space(context);
{
LayoutParams lp = new LayoutParams(row5, col3);
- lp.rowWeight = 1;
- lp.columnWeight = 1;
+ lp.widthSpec = CAN_STRETCH;
+ lp.heightSpec = CAN_STRETCH;
vg.addView(v, lp);
}
}