am c7ec100c: am 193d98ec: Add new API demo for -swNNNdp resource qualifier.

* commit 'c7ec100ccb5266a3c480eb2563a511b86d106d10':
  Add new API demo for -swNNNdp resource qualifier.
This commit is contained in:
Dianne Hackborn
2011-05-19 19:34:15 -07:00
committed by Android Git Automerger
17 changed files with 496 additions and 11 deletions

View File

@@ -1029,7 +1029,17 @@
<activity android:name=".content.ResourcesWidthAndHeight" <activity android:name=".content.ResourcesWidthAndHeight"
android:label="@string/activity_resources_width_and_height" android:label="@string/activity_resources_width_and_height"
android:enabled="@bool/atLeastIceCreamSandwich"> android:enabled="@bool/atLeastHoneycombMR2">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.SAMPLE_CODE" />
<category android:name="android.intent.category.EMBED" />
</intent-filter>
</activity>
<activity android:name=".content.ResourcesSmallestWidth"
android:label="@string/activity_resources_smallest_width"
android:enabled="@bool/atLeastHoneycombMR2">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.SAMPLE_CODE" /> <category android:name="android.intent.category.SAMPLE_CODE" />

View File

@@ -39,5 +39,15 @@
android:background="#80ff0000"> android:background="#80ff0000">
<include layout="@layout/resources_width" /> <include layout="@layout/resources_width" />
</FrameLayout> </FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#8000ff00">
<include layout="@layout/resources_width" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#80ff0000">
<include layout="@layout/resources_width" />
</FrameLayout>
</LinearLayout> </LinearLayout>
</merge> </merge>

View File

@@ -0,0 +1,43 @@
<?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.
-->
<!-- Part of resources_width_and_height that varies based on height. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#8000ff00">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#80ff0000">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#8000ff00">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#80ff0000">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
</LinearLayout>
</merge>

View File

@@ -22,22 +22,22 @@
<TextView android:layout_width="0px" android:layout_height="match_parent" <TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal" android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp" android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="w420dp Width\n#1"> android:background="#800000ff" android:text="sw480dp #1">
</TextView> </TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent" <TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal" android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp" android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="w420dp Width\n#2"> android:background="#800000ff" android:text="sw480dp #2">
</TextView> </TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent" <TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal" android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp" android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="w420dp Width\n#3"> android:background="#800000ff" android:text="sw480dp #3">
</TextView> </TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent" <TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal" android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp" android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="w420dp Width\n#4"> android:background="#800000ff" android:text="sw480dp #4">
</TextView> </TextView>
</LinearLayout> </LinearLayout>
</merge> </merge>

View File

@@ -0,0 +1,53 @@
<?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.
-->
<!-- Part of resources_width_and_height that varies based on height. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#8000ff00">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#80ff0000">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#8000ff00">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#80ff0000">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#8000ff00">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#80ff0000">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
</LinearLayout>
</merge>

View File

@@ -0,0 +1,53 @@
<?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.
-->
<!-- Part of resources_width_and_height that varies based on width. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="horizontal">
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw600dp #1">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw600dp #2">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw600dp #3">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw600dp #4">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw600dp #5">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw600dp #6">
</TextView>
</LinearLayout>
</merge>

View File

@@ -0,0 +1,63 @@
<?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.
-->
<!-- Part of resources_width_and_height that varies based on height. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#8000ff00">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#80ff0000">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#8000ff00">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#80ff0000">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#8000ff00">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#80ff0000">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#8000ff00">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#80ff0000">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
</LinearLayout>
</merge>

View File

@@ -0,0 +1,63 @@
<?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.
-->
<!-- Part of resources_width_and_height that varies based on width. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="horizontal">
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw720dp #1">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw720dp #2">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw720dp #3">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw720dp #4">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw720dp #5">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw720dp #6">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw720dp #7">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="sw720dp #8">
</TextView>
</LinearLayout>
</merge>

View File

@@ -0,0 +1,53 @@
<?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.
-->
<!-- Part of resources_width_and_height that varies based on width. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="horizontal">
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="w600dp Width\n#1">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="w600dp Width\n#2">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="w600dp Width\n#3">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="w600dp Width\n#4">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="w600dp Width\n#5">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="w600dp Width\n#6">
</TextView>
</LinearLayout>
</merge>

View File

@@ -0,0 +1,35 @@
<?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.
-->
<!-- Demonstrates using -wNNNdp and -hNNNdp resource configs. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical">
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_weight="0" android:gravity="center_horizontal"
android:paddingTop="8dp" android:paddingBottom="8dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/resources_smallest_width_description"/>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1"
android:background="@android:drawable/gallery_thumb">
<include layout="@layout/resources_smallest_width_inner" />
</FrameLayout>
</LinearLayout>

View File

@@ -0,0 +1,33 @@
<?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.
-->
<!-- Part of resources_width_and_height that varies based on height. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#8000ff00">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
<FrameLayout android:layout_width="match_parent" android:layout_height="0px"
android:layout_weight="1" android:padding="4dp"
android:background="#80ff0000">
<include layout="@layout/resources_smallest_width_row" />
</FrameLayout>
</LinearLayout>
</merge>

View File

@@ -0,0 +1,33 @@
<?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.
-->
<!-- Part of resources_width_and_height that varies based on width. -->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="horizontal">
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="Default Width\n#1">
</TextView>
<TextView android:layout_width="0px" android:layout_height="match_parent"
android:layout_weight="1" android:gravity="center_horizontal"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:background="#800000ff" android:text="Default Width\n#2">
</TextView>
</LinearLayout>
</merge>

View File

@@ -15,6 +15,6 @@
--> -->
<resources> <resources>
<!-- True if running under Ice Cream Sandwich or later. --> <!-- True if running under Honeycomb MR2 or later. -->
<bool name="atLeastIceCreamSandwich">true</bool> <bool name="atLeastHoneycombMR2">true</bool>
</resources> </resources>

View File

@@ -19,8 +19,8 @@
API level. The default value is false; an alternative value API level. The default value is false; an alternative value
for Honeycomb is true. --> for Honeycomb is true. -->
<bool name="atLeastHoneycomb">false</bool> <bool name="atLeastHoneycomb">false</bool>
<!-- This resource is true if running under at least Ice Cream Sandwich's <!-- This resource is true if running under at least Honeycomb MR2's
API level. The default value is false; an alternative value API level. The default value is false; an alternative value
for Ice Cream Sandwich is true. --> for Honeycomb MR2 is true. -->
<bool name="atLeastIceCreamSandwich">false</bool> <bool name="atLeastHoneycombMR2">false</bool>
</resources> </resources>

View File

@@ -356,6 +356,10 @@
<string name="resources_width_and_height_description">The layouts below use -wNNNdp and <string name="resources_width_and_height_description">The layouts below use -wNNNdp and
-hNNNdp to select between different versions based on the size of the screen.</string> -hNNNdp to select between different versions based on the size of the screen.</string>
<string name="activity_resources_smallest_width">Content/Resources/Smallest Width</string>
<string name="resources_smallest_width_description">The layouts below use -swNNNdp
to select between different versions based on the size of the screen.</string>
<string name="activity_read_asset">Content/Assets/Read Asset</string> <string name="activity_read_asset">Content/Assets/Read Asset</string>
<string name="activity_themes">Content/Resources/Themes</string> <string name="activity_themes">Content/Resources/Themes</string>

View File

@@ -0,0 +1,33 @@
/*
* 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.example.android.apis.content;
import com.example.android.apis.R;
import android.app.Activity;
import android.os.Bundle;
public class ResourcesSmallestWidth extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// This layout uses different configurations to adjust
// what is shown based on the smallest width that will occur.
setContentView(R.layout.resources_smallest_width);
}
}

View File

@@ -20,7 +20,6 @@ import com.example.android.apis.R;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
import android.widget.TextView;
public class ResourcesWidthAndHeight extends Activity { public class ResourcesWidthAndHeight extends Activity {
@Override @Override