summaryrefslogtreecommitdiffstats
path: root/tests/GridLayoutTest
diff options
context:
space:
mode:
authorPhilip Milne <pmilne@google.com>2011-10-06 16:11:35 -0700
committerPhilip Milne <pmilne@google.com>2011-10-06 16:11:35 -0700
commite974f6384b1ab04c797c807286223c12cadfddcb (patch)
tree10f568cb70d47490ed41f6bb528f2cb90c626392 /tests/GridLayoutTest
parentb74931559b9e95b22ea632c243acda19fe8ea82c (diff)
downloadframeworks_base-e974f6384b1ab04c797c807286223c12cadfddcb.zip
frameworks_base-e974f6384b1ab04c797c807286223c12cadfddcb.tar.gz
frameworks_base-e974f6384b1ab04c797c807286223c12cadfddcb.tar.bz2
Move Activity1 and Activity2 to API Demos area in development/samples.
Change-Id: Ib6521caca69b0a0d96c66d9df754d2af17cb6908
Diffstat (limited to 'tests/GridLayoutTest')
-rw-r--r--tests/GridLayoutTest/AndroidManifest.xml14
-rw-r--r--tests/GridLayoutTest/res/layout/grid3.xml87
-rw-r--r--tests/GridLayoutTest/src/com/android/test/layout/Activity2.java116
-rw-r--r--tests/GridLayoutTest/src/com/android/test/layout/Activity3.java27
4 files changed, 0 insertions, 244 deletions
diff --git a/tests/GridLayoutTest/AndroidManifest.xml b/tests/GridLayoutTest/AndroidManifest.xml
index 1b72357..141e8fa 100644
--- a/tests/GridLayoutTest/AndroidManifest.xml
+++ b/tests/GridLayoutTest/AndroidManifest.xml
@@ -35,20 +35,6 @@
</intent-filter>
</activity>
- <activity android:name="Activity2" android:label="Activity2">
- <intent-filter>
- <action android:name="android.intent.action.MAIN"/>
- <category android:name="android.intent.category.LAUNCHER"/>
- </intent-filter>
- </activity>
-
- <activity android:name="Activity3" android:label="Activity3">
- <intent-filter>
- <action android:name="android.intent.action.MAIN"/>
- <category android:name="android.intent.category.LAUNCHER"/>
- </intent-filter>
- </activity>
-
<activity android:name="Activity4" android:label="Activity4">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
diff --git a/tests/GridLayoutTest/res/layout/grid3.xml b/tests/GridLayoutTest/res/layout/grid3.xml
deleted file mode 100644
index 0e53613..0000000
--- a/tests/GridLayoutTest/res/layout/grid3.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<GridLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
-
- android:layout_width="match_parent"
- android:layout_height="match_parent"
-
- android:useDefaultMargins="true"
- android:alignmentMode="alignBounds"
- android:rowOrderPreserved="false"
-
- android:columnCount="4"
- >
-
- <TextView
- android:text="Email setup"
- android:textSize="32dip"
-
- android:layout_columnSpan="4"
- android:layout_gravity="center_horizontal"
- />
-
- <TextView
- android:text="You can configure email in just a few steps:"
- android:textSize="16dip"
-
- android:layout_columnSpan="4"
- android:layout_gravity="left"
- />
-
- <TextView
- android:text="Email address:"
-
- android:layout_gravity="right"
- />
-
- <EditText
- android:ems="10"
- />
-
- <TextView
- android:text="Password:"
-
- android:layout_column="0"
- android:layout_gravity="right"
- />
-
- <EditText
- android:ems="8"
- />
-
- <Space
- android:layout_row="2"
- android:layout_rowSpan="3"
- android:layout_column="2"
- android:layout_gravity="fill"
- />
-
- <Button
- android:text="Manual setup"
-
- android:layout_row="5"
- android:layout_column="3"
- />
-
- <Button
- android:text="Next"
-
- android:layout_column="3"
- android:layout_gravity="fill_horizontal"
- />
-</GridLayout>
diff --git a/tests/GridLayoutTest/src/com/android/test/layout/Activity2.java b/tests/GridLayoutTest/src/com/android/test/layout/Activity2.java
deleted file mode 100644
index 8974f37..0000000
--- a/tests/GridLayoutTest/src/com/android/test/layout/Activity2.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.test.layout;
-
-import android.app.Activity;
-import android.content.Context;
-import android.os.Bundle;
-import android.view.View;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.GridLayout;
-import android.widget.Space;
-import android.widget.TextView;
-
-import static android.text.InputType.TYPE_CLASS_TEXT;
-import static android.view.inputmethod.EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;
-import static android.view.inputmethod.EditorInfo.TYPE_TEXT_VARIATION_PASSWORD;
-import static android.widget.GridLayout.*;
-
-public class Activity2 extends Activity {
-
- public static View create(Context context) {
- GridLayout p = new GridLayout(context);
- p.setUseDefaultMargins(true);
- p.setAlignmentMode(ALIGN_BOUNDS);
- p.setRowOrderPreserved(false);
-
- Spec row1 = spec(0);
- Spec row2 = spec(1);
- Spec row3 = spec(2, BASELINE);
- Spec row4 = spec(3, BASELINE);
- Spec row5 = spec(2, 3, FILL); // allow the last two rows to overlap the middle two
- Spec row6 = spec(5);
- Spec row7 = spec(6);
-
- Spec col1a = spec(0, 4, CENTER);
- Spec col1b = spec(0, 4, LEFT);
- Spec col1c = spec(0, RIGHT);
- Spec col2 = spec(1, LEFT);
- Spec col3 = spec(2, FILL);
- Spec col4a = spec(3);
- Spec col4b = spec(3, FILL);
-
- {
- TextView c = new TextView(context);
- c.setTextSize(32);
- c.setText("Email setup");
- p.addView(c, new LayoutParams(row1, col1a));
- }
- {
- TextView c = new TextView(context);
- c.setTextSize(16);
- c.setText("You can configure email in just a few steps:");
- p.addView(c, new LayoutParams(row2, col1b));
- }
- {
- TextView c = new TextView(context);
- c.setText("Email address:");
- p.addView(c, new LayoutParams(row3, col1c));
- }
- {
- EditText c = new EditText(context);
- c.setEms(10);
- c.setInputType(TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
- p.addView(c, new LayoutParams(row3, col2));
- }
- {
- TextView c = new TextView(context);
- c.setText("Password:");
- p.addView(c, new LayoutParams(row4, col1c));
- }
- {
- TextView c = new EditText(context);
- c.setEms(8);
- c.setInputType(TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_PASSWORD);
- p.addView(c, new LayoutParams(row4, col2));
- }
- {
- Space c = new Space(context);
- LayoutParams lp = new LayoutParams(row5, col3);
- p.addView(c, lp);
- }
- {
- Button c = new Button(context);
- c.setText("Manual setup");
- p.addView(c, new LayoutParams(row6, col4a));
- }
- {
- Button c = new Button(context);
- c.setText("Next");
- p.addView(c, new LayoutParams(row7, col4b));
- }
-
- return p;
- }
-
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(create(getBaseContext()));
- }
-
-} \ No newline at end of file
diff --git a/tests/GridLayoutTest/src/com/android/test/layout/Activity3.java b/tests/GridLayoutTest/src/com/android/test/layout/Activity3.java
deleted file mode 100644
index fc0b382..0000000
--- a/tests/GridLayoutTest/src/com/android/test/layout/Activity3.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.test.layout;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-public class Activity3 extends Activity {
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.grid3);
- }
-}