diff options
Diffstat (limited to 'tests/appwidgets/AppWidgetHostTest/res')
6 files changed, 152 insertions, 0 deletions
diff --git a/tests/appwidgets/AppWidgetHostTest/res/drawable/oh_hai_icon.png b/tests/appwidgets/AppWidgetHostTest/res/drawable/oh_hai_icon.png Binary files differnew file mode 100644 index 0000000..30ff267 --- /dev/null +++ b/tests/appwidgets/AppWidgetHostTest/res/drawable/oh_hai_icon.png diff --git a/tests/appwidgets/AppWidgetHostTest/res/layout/appwidget_host.xml b/tests/appwidgets/AppWidgetHostTest/res/layout/appwidget_host.xml new file mode 100644 index 0000000..e5c3b28 --- /dev/null +++ b/tests/appwidgets/AppWidgetHostTest/res/layout/appwidget_host.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2006 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent" > + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/appwidget_view_title" + /> + + <ScrollView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + > + + <com.android.tests.appwidgethost.AppWidgetContainerView + android:id="@+id/appwidget_container" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + /> + + </ScrollView> + + <Button + android:id="@+id/add_appwidget" + android:text="@string/add_appwidget" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + /> + +</LinearLayout> + diff --git a/tests/appwidgets/AppWidgetHostTest/res/layout/test_appwidget.xml b/tests/appwidgets/AppWidgetHostTest/res/layout/test_appwidget.xml new file mode 100644 index 0000000..4d483c7 --- /dev/null +++ b/tests/appwidgets/AppWidgetHostTest/res/layout/test_appwidget.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2006 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. +--> + +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/oh_hai_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/oh_hai" +/> + diff --git a/tests/appwidgets/AppWidgetHostTest/res/layout/test_appwidget_configure.xml b/tests/appwidgets/AppWidgetHostTest/res/layout/test_appwidget_configure.xml new file mode 100644 index 0000000..0d9b983 --- /dev/null +++ b/tests/appwidgets/AppWidgetHostTest/res/layout/test_appwidget_configure.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2006 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + > + + <TextView + android:id="@+id/oh_hai_text" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:text="@string/oh_hai" + /> + + <EditText + android:id="@+id/edit_text" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + /> + + <Button + android:id="@+id/save_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/save" + /> + + +</LinearLayout> diff --git a/tests/appwidgets/AppWidgetHostTest/res/values/strings.xml b/tests/appwidgets/AppWidgetHostTest/res/values/strings.xml new file mode 100644 index 0000000..8a617e7 --- /dev/null +++ b/tests/appwidgets/AppWidgetHostTest/res/values/strings.xml @@ -0,0 +1,24 @@ +<?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="appwidget_view_title">Widget Test</string> + <string name="add_appwidget">Add Widget</string> + <string name="oh_hai">Oh hai.</string> + <string name="delete_appwidget">Delete</string> + <string name="save">Save</string> +</resources> + diff --git a/tests/appwidgets/AppWidgetHostTest/res/xml/appwidget_info.xml b/tests/appwidgets/AppWidgetHostTest/res/xml/appwidget_info.xml new file mode 100644 index 0000000..f12ba16 --- /dev/null +++ b/tests/appwidgets/AppWidgetHostTest/res/xml/appwidget_info.xml @@ -0,0 +1,10 @@ +<!-- BEGIN_INCLUDE(AppWidgetProviderInfo) --> +<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" + android:minWidth="40dp" + android:minHeight="30dp" + android:updatePeriodMillis="86400000" + android:initialLayout="@layout/test_appwidget" + android:configure="com.android.tests.appwidgethost.TestAppWidgetConfigure" + > +</appwidget-provider> +<!-- END_INCLUDE(AppWidgetProviderInfo) --> |