summaryrefslogtreecommitdiffstats
path: root/tests/DpiTest
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-07-21 17:46:02 -0700
committerDianne Hackborn <hackbod@google.com>2009-07-21 18:28:42 -0700
commitc4db95c077f826585d20be2f3db4043c53d30cf5 (patch)
tree9176baa673f97b27150f862485fd492cb3ec7e88 /tests/DpiTest
parentfe6f45c81463d2d28e11ac6083f2653e1286c5ef (diff)
downloadframeworks_base-c4db95c077f826585d20be2f3db4043c53d30cf5.zip
frameworks_base-c4db95c077f826585d20be2f3db4043c53d30cf5.tar.gz
frameworks_base-c4db95c077f826585d20be2f3db4043c53d30cf5.tar.bz2
First pass at reworking screen density/size APIs.
This changes the names of the directories in aapt, to what you see in the list of DpiTest resources. Also adds a new "long" configuration for wide screens, which the platform sets appropriate, and introduces a new kind of resizeability for not large but significantly larger than normal screens which may have compatibility issues.
Diffstat (limited to 'tests/DpiTest')
-rw-r--r--tests/DpiTest/res/drawable-hdpi/logo240dpi.png (renamed from tests/DpiTest/res/drawable-240dpi/logo240dpi.png)bin13388 -> 13388 bytes
-rw-r--r--tests/DpiTest/res/drawable-ldpi/logo120dpi.png (renamed from tests/DpiTest/res/drawable-120dpi/logo120dpi.png)bin5178 -> 5178 bytes
-rw-r--r--tests/DpiTest/res/values-large-long/strings.xml (renamed from tests/DpiTest/res/values-smallScreen/strings.xml)2
-rw-r--r--tests/DpiTest/res/values-large-notlong/strings.xml (renamed from tests/DpiTest/res/values-normalScreen/strings.xml)2
-rw-r--r--tests/DpiTest/res/values-large/strings.xml (renamed from tests/DpiTest/res/values-largeScreen/strings.xml)2
-rw-r--r--tests/DpiTest/res/values-long/strings.xml19
-rw-r--r--tests/DpiTest/res/values-normal-long/strings.xml19
-rw-r--r--tests/DpiTest/res/values-normal-notlong/strings.xml19
-rw-r--r--tests/DpiTest/res/values-normal/strings.xml19
-rw-r--r--tests/DpiTest/res/values-notlong/strings.xml19
-rw-r--r--tests/DpiTest/res/values-small-long/strings.xml19
-rw-r--r--tests/DpiTest/res/values-small-notlong/strings.xml19
-rw-r--r--tests/DpiTest/res/values-small/strings.xml19
-rw-r--r--tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java3
14 files changed, 157 insertions, 4 deletions
diff --git a/tests/DpiTest/res/drawable-240dpi/logo240dpi.png b/tests/DpiTest/res/drawable-hdpi/logo240dpi.png
index 4d717a8..4d717a8 100644
--- a/tests/DpiTest/res/drawable-240dpi/logo240dpi.png
+++ b/tests/DpiTest/res/drawable-hdpi/logo240dpi.png
Binary files differ
diff --git a/tests/DpiTest/res/drawable-120dpi/logo120dpi.png b/tests/DpiTest/res/drawable-ldpi/logo120dpi.png
index 46bbd5b..46bbd5b 100644
--- a/tests/DpiTest/res/drawable-120dpi/logo120dpi.png
+++ b/tests/DpiTest/res/drawable-ldpi/logo120dpi.png
Binary files differ
diff --git a/tests/DpiTest/res/values-smallScreen/strings.xml b/tests/DpiTest/res/values-large-long/strings.xml
index cdb4ac9..be304a7 100644
--- a/tests/DpiTest/res/values-smallScreen/strings.xml
+++ b/tests/DpiTest/res/values-large-long/strings.xml
@@ -15,5 +15,5 @@
-->
<resources>
- <string name="act_title">DpiTest: Small Screen</string>
+ <string name="act_title">DpiTest: Large Long</string>
</resources>
diff --git a/tests/DpiTest/res/values-normalScreen/strings.xml b/tests/DpiTest/res/values-large-notlong/strings.xml
index 256d696..9681f44 100644
--- a/tests/DpiTest/res/values-normalScreen/strings.xml
+++ b/tests/DpiTest/res/values-large-notlong/strings.xml
@@ -15,5 +15,5 @@
-->
<resources>
- <string name="act_title">DpiTest: Normal Screen</string>
+ <string name="act_title">DpiTest: Large NotLong</string>
</resources>
diff --git a/tests/DpiTest/res/values-largeScreen/strings.xml b/tests/DpiTest/res/values-large/strings.xml
index f4dd543..faa95f2 100644
--- a/tests/DpiTest/res/values-largeScreen/strings.xml
+++ b/tests/DpiTest/res/values-large/strings.xml
@@ -15,5 +15,5 @@
-->
<resources>
- <string name="act_title">DpiTest: Large Screen</string>
+ <string name="act_title">DpiTest: Large</string>
</resources>
diff --git a/tests/DpiTest/res/values-long/strings.xml b/tests/DpiTest/res/values-long/strings.xml
new file mode 100644
index 0000000..d6e5d93
--- /dev/null
+++ b/tests/DpiTest/res/values-long/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<resources>
+ <string name="act_title">DpiTest: Long</string>
+</resources>
diff --git a/tests/DpiTest/res/values-normal-long/strings.xml b/tests/DpiTest/res/values-normal-long/strings.xml
new file mode 100644
index 0000000..6406083
--- /dev/null
+++ b/tests/DpiTest/res/values-normal-long/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<resources>
+ <string name="act_title">DpiTest: Normal Long</string>
+</resources>
diff --git a/tests/DpiTest/res/values-normal-notlong/strings.xml b/tests/DpiTest/res/values-normal-notlong/strings.xml
new file mode 100644
index 0000000..3265e4c5
--- /dev/null
+++ b/tests/DpiTest/res/values-normal-notlong/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<resources>
+ <string name="act_title">DpiTest: Normal NotLong</string>
+</resources>
diff --git a/tests/DpiTest/res/values-normal/strings.xml b/tests/DpiTest/res/values-normal/strings.xml
new file mode 100644
index 0000000..1e27da4
--- /dev/null
+++ b/tests/DpiTest/res/values-normal/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<resources>
+ <string name="act_title">DpiTest: Normal</string>
+</resources>
diff --git a/tests/DpiTest/res/values-notlong/strings.xml b/tests/DpiTest/res/values-notlong/strings.xml
new file mode 100644
index 0000000..4b9d5da
--- /dev/null
+++ b/tests/DpiTest/res/values-notlong/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<resources>
+ <string name="act_title">DpiTest: NotLong</string>
+</resources>
diff --git a/tests/DpiTest/res/values-small-long/strings.xml b/tests/DpiTest/res/values-small-long/strings.xml
new file mode 100644
index 0000000..2575b0d
--- /dev/null
+++ b/tests/DpiTest/res/values-small-long/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<resources>
+ <string name="act_title">DpiTest: Small Long</string>
+</resources>
diff --git a/tests/DpiTest/res/values-small-notlong/strings.xml b/tests/DpiTest/res/values-small-notlong/strings.xml
new file mode 100644
index 0000000..2df2b29
--- /dev/null
+++ b/tests/DpiTest/res/values-small-notlong/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<resources>
+ <string name="act_title">DpiTest: Small NotLong</string>
+</resources>
diff --git a/tests/DpiTest/res/values-small/strings.xml b/tests/DpiTest/res/values-small/strings.xml
new file mode 100644
index 0000000..9fd5e40
--- /dev/null
+++ b/tests/DpiTest/res/values-small/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<resources>
+ <string name="act_title">DpiTest: Small</string>
+</resources>
diff --git a/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java b/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
index 8c69305..49fff57 100644
--- a/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
+++ b/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
@@ -57,7 +57,8 @@ public class DpiTestActivity extends Activity {
if (noCompat) {
ai.flags |= ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS
- | ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS;
+ | ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS
+ | ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS;
ai.supportsDensities = new int[] { ApplicationInfo.ANY_DENSITY };
app.getResources().setCompatibilityInfo(new CompatibilityInfo(ai));
}