diff options
| author | Adam Cohen <adamcohen@google.com> | 2011-10-07 09:56:33 -0700 |
|---|---|---|
| committer | Adam Cohen <adamcohen@google.com> | 2011-10-07 11:27:16 -0700 |
| commit | 6293583f9a1e79fdd9814551d33d63ef40057fa8 (patch) | |
| tree | acc7062d642a413bcfc1f80ca730f9ecbb6139bb /samples/StackWidget | |
| parent | 6e4271f1a0d2e88a6a49cb87cbb81d343cb23c99 (diff) | |
| download | android_development-6293583f9a1e79fdd9814551d33d63ef40057fa8.tar.gz android_development-6293583f9a1e79fdd9814551d33d63ef40057fa8.tar.bz2 android_development-6293583f9a1e79fdd9814551d33d63ef40057fa8.zip | |
Cleaning up the stack sample widget
Change-Id: Ie5d1bcacb1943e87c0517b6e38cad1598e119f7d
Diffstat (limited to 'samples/StackWidget')
| -rw-r--r-- | samples/StackWidget/AndroidManifest.xml | 2 | ||||
| -rw-r--r-- | samples/StackWidget/res/layout/widget_layout.xml | 3 | ||||
| -rw-r--r-- | samples/StackWidget/res/values-v14/dimens.xml | 18 | ||||
| -rw-r--r-- | samples/StackWidget/res/values/dimens.xml | 18 | ||||
| -rw-r--r-- | samples/StackWidget/res/xml/stackwidgetinfo.xml | 10 |
5 files changed, 45 insertions, 6 deletions
diff --git a/samples/StackWidget/AndroidManifest.xml b/samples/StackWidget/AndroidManifest.xml index 1fec1570e..25517f017 100644 --- a/samples/StackWidget/AndroidManifest.xml +++ b/samples/StackWidget/AndroidManifest.xml @@ -22,7 +22,7 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.android.stackwidget"> - <uses-sdk android:targetSdkVersion="11" android:minSdkVersion="11"/> + <uses-sdk android:targetSdkVersion="14" android:minSdkVersion="11"/> <application android:label="StackWidget"> <receiver android:name="StackWidgetProvider"> <intent-filter> diff --git a/samples/StackWidget/res/layout/widget_layout.xml b/samples/StackWidget/res/layout/widget_layout.xml index 11f9d3665..983c6fb8e 100644 --- a/samples/StackWidget/res/layout/widget_layout.xml +++ b/samples/StackWidget/res/layout/widget_layout.xml @@ -15,7 +15,8 @@ --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:layout_margin="@dimen/widget_margin"> <StackView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/stack_view" android:layout_width="match_parent" diff --git a/samples/StackWidget/res/values-v14/dimens.xml b/samples/StackWidget/res/values-v14/dimens.xml new file mode 100644 index 000000000..2626bc37b --- /dev/null +++ b/samples/StackWidget/res/values-v14/dimens.xml @@ -0,0 +1,18 @@ +<?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. +--> +<resources> + <dimen name="widget_margin">0dp</dimen> +</resources> diff --git a/samples/StackWidget/res/values/dimens.xml b/samples/StackWidget/res/values/dimens.xml new file mode 100644 index 000000000..aa8a9e2b1 --- /dev/null +++ b/samples/StackWidget/res/values/dimens.xml @@ -0,0 +1,18 @@ +<?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. +--> +<resources> + <dimen name="widget_margin">8dp</dimen> +</resources> diff --git a/samples/StackWidget/res/xml/stackwidgetinfo.xml b/samples/StackWidget/res/xml/stackwidgetinfo.xml index 6f59605bf..2a587e152 100644 --- a/samples/StackWidget/res/xml/stackwidgetinfo.xml +++ b/samples/StackWidget/res/xml/stackwidgetinfo.xml @@ -15,11 +15,13 @@ --> <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" - android:minWidth="150dip" - android:minHeight="150dip" + android:minWidth="110dip" + android:minHeight="110dip" android:updatePeriodMillis="3600000" android:previewImage="@drawable/preview" android:initialLayout="@layout/widget_layout" - android:autoAdvanceViewId="@id/stack_view" - android:resizeMode="horizontal|vertical"> + android:autoAdvanceViewId="@id/stack_view"> </appwidget-provider> +<!--to enable resizing: + android:resizeMode="horizontal|vertical" --> +
\ No newline at end of file |
