summaryrefslogtreecommitdiffstats
path: root/tests/DpiTest
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-04-23 17:51:26 -0700
committerDianne Hackborn <hackbod@google.com>2010-04-28 16:51:52 -0700
commit14cee9f688c32d63d8521188e7422811629bb7c2 (patch)
tree16c2f2356519a2552bb3b7e2b1de6735793c4b1a /tests/DpiTest
parent3fd6419fe542c4ecb8e838d1754a83ce8591b288 (diff)
downloadframeworks_base-14cee9f688c32d63d8521188e7422811629bb7c2.zip
frameworks_base-14cee9f688c32d63d8521188e7422811629bb7c2.tar.gz
frameworks_base-14cee9f688c32d63d8521188e7422811629bb7c2.tar.bz2
New xlarge screen size.
Not complete, only for experimentation at this point. This includes a reworking of how screen size configurations are matched, so that if you are on a larger screen we can select configurations for smaller screens if there aren't any exactly matching the current screen. The screen size at which we switch to xlarge has been arbitrarily chosen; the compatibility behavior has not yet been defined. Change-Id: I1a33b3818eeb51a68fb72397568c39ab040a07f5
Diffstat (limited to 'tests/DpiTest')
-rw-r--r--tests/DpiTest/Android.mk2
-rw-r--r--tests/DpiTest/res/values-xlarge-long/strings.xml19
-rw-r--r--tests/DpiTest/res/values-xlarge-notlong/strings.xml19
-rw-r--r--tests/DpiTest/res/values-xlarge/strings.xml19
-rw-r--r--tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java3
5 files changed, 61 insertions, 1 deletions
diff --git a/tests/DpiTest/Android.mk b/tests/DpiTest/Android.mk
index 3596c39..5463a17 100644
--- a/tests/DpiTest/Android.mk
+++ b/tests/DpiTest/Android.mk
@@ -7,4 +7,6 @@ LOCAL_PACKAGE_NAME := DensityTest
LOCAL_MODULE_TAGS := tests
+LOCAL_AAPT_FLAGS = -c 120dpi -c 240dpi -c 160dpi
+
include $(BUILD_PACKAGE)
diff --git a/tests/DpiTest/res/values-xlarge-long/strings.xml b/tests/DpiTest/res/values-xlarge-long/strings.xml
new file mode 100644
index 0000000..86ab660
--- /dev/null
+++ b/tests/DpiTest/res/values-xlarge-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: XLarge Long</string>
+</resources>
diff --git a/tests/DpiTest/res/values-xlarge-notlong/strings.xml b/tests/DpiTest/res/values-xlarge-notlong/strings.xml
new file mode 100644
index 0000000..1eebbf4
--- /dev/null
+++ b/tests/DpiTest/res/values-xlarge-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: XLarge NotLong</string>
+</resources>
diff --git a/tests/DpiTest/res/values-xlarge/strings.xml b/tests/DpiTest/res/values-xlarge/strings.xml
new file mode 100644
index 0000000..7e5d4b0
--- /dev/null
+++ b/tests/DpiTest/res/values-xlarge/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: XLarge</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 cde2c71..6192a3c 100644
--- a/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
+++ b/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
@@ -56,7 +56,8 @@ public class DpiTestActivity extends Activity {
ApplicationInfo ai = app.getPackageManager().getApplicationInfo(
"com.google.android.test.dpi", 0);
if (noCompat) {
- ai.flags |= ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS
+ ai.flags |= ApplicationInfo.FLAG_SUPPORTS_XLARGE_SCREENS
+ | ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_NORMAL_SCREENS
| ApplicationInfo.FLAG_SUPPORTS_SMALL_SCREENS
| ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS