summaryrefslogtreecommitdiffstats
path: root/apps/Development/res
diff options
context:
space:
mode:
authorFred Quintana <fredq@google.com>2009-11-03 17:18:33 -0800
committerFred Quintana <fredq@google.com>2009-11-05 11:05:11 -0800
commitd7a3ea819dc9bc2355446ae12b4792e6e5e899fb (patch)
tree98cb8cdbd54b1b0c70addf8599ef3f41d89675f5 /apps/Development/res
parent8d700bdf67681ad405819c06906325768f8cf9ea (diff)
downloadandroid_development-d7a3ea819dc9bc2355446ae12b4792e6e5e899fb.tar.gz
android_development-d7a3ea819dc9bc2355446ae12b4792e6e5e899fb.tar.bz2
android_development-d7a3ea819dc9bc2355446ae12b4792e6e5e899fb.zip
create a test app that allows direct control of a sync adapter for testing purposes
http://b/issue?id=2239791
Diffstat (limited to 'apps/Development/res')
-rw-r--r--apps/Development/res/layout/account_list_view.xml20
-rw-r--r--apps/Development/res/layout/sync_adapter_driver.xml86
-rw-r--r--apps/Development/res/layout/sync_adapter_item.xml26
-rw-r--r--apps/Development/res/values/strings.xml21
4 files changed, 153 insertions, 0 deletions
diff --git a/apps/Development/res/layout/account_list_view.xml b/apps/Development/res/layout/account_list_view.xml
new file mode 100644
index 000000000..d25567266
--- /dev/null
+++ b/apps/Development/res/layout/account_list_view.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<ListView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"/>
diff --git a/apps/Development/res/layout/sync_adapter_driver.xml b/apps/Development/res/layout/sync_adapter_driver.xml
new file mode 100644
index 000000000..58c0ebb34
--- /dev/null
+++ b/apps/Development/res/layout/sync_adapter_driver.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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">
+
+ <LinearLayout android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
+ <TextView android:id="@+id/sync_adapters_spinner_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="22dip"
+ android:text="@string/sync_adapters_spinner_label"/>
+
+ <Spinner android:id="@+id/sync_adapters_spinner"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="52dip">
+ <Button
+ android:id="@+id/bind_button"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:text="@string/bind_button"
+ android:onClick="initiateBind"
+ android:layout_weight="2"/>
+
+ <Button
+ android:id="@+id/unbind_button"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:text="@string/unbind_button"
+ android:onClick="initiateUnbind"
+ android:layout_weight="2"/>
+ </LinearLayout>
+
+ <TextView android:id="@+id/bound_adapter_text_view"
+ android:layout_width="wrap_content"
+ android:textSize="20dip"
+ android:layout_height="wrap_content"/>
+
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="52dip">
+ <Button
+ android:id="@+id/start_sync_button"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:text="@string/start_sync_button"
+ android:onClick="startSyncSelected"
+ android:layout_weight="2"/>
+
+ <Button
+ android:id="@+id/cancel_sync_button"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:text="@string/cancel_sync_button"
+ android:onClick="cancelSync"
+ android:layout_weight="2"/>
+ </LinearLayout>
+
+ <TextView android:id="@+id/status_text_view"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+ </LinearLayout>
+</LinearLayout>
diff --git a/apps/Development/res/layout/sync_adapter_item.xml b/apps/Development/res/layout/sync_adapter_item.xml
new file mode 100644
index 000000000..d818c789a
--- /dev/null
+++ b/apps/Development/res/layout/sync_adapter_item.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2009, 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="@android:id/text1"
+ style="?android:attr/spinnerItemStyle"
+ android:singleLine="true"
+ android:layout_width="fill_parent"
+ android:layout_height="52dip"
+ android:ellipsize="marquee" />
diff --git a/apps/Development/res/values/strings.xml b/apps/Development/res/values/strings.xml
index ad70fbede..c8a3f8b85 100644
--- a/apps/Development/res/values/strings.xml
+++ b/apps/Development/res/values/strings.xml
@@ -155,4 +155,25 @@
<string name="accounts_tester_edit_properties">Properties</string>
<string name="accounts_tester_desired_authtokentype_label">authtoken type:</string>
<string name="accounts_tester_desired_features_label">features:</string>
+
+ <!-- SyncAdapterDriver -->
+ <string name="bind_button">bind</string>
+ <string name="unbind_button">unbind</string>
+ <string name="start_sync_button">start sync</string>
+ <string name="cancel_sync_button">cancel sync</string>
+ <string name="sync_adapters_spinner_label">Registered Sync Adapters:</string>
+ <string name="status_starting_sync_format">Starting a sync of account %s...</string>
+ <string name="status_remote_exception_while_starting_sync">Got a RemoteException while starting the sync</string>
+ <string name="status_canceled_sync">Canceled the sync</string>
+ <string name="status_remote_exception_while_canceling_sync">Got a RemoteException while canceling the sync</string>
+ <string name="status_received_heartbeat">Received heartbeat</string>
+ <string name="status_sync_failed_format">Sync failed: %s</string>
+ <string name="status_sync_succeeded_format">Sync succeeded: %s</string>
+ <string name="status_already_bound">Already bound to sync adapter</string>
+ <string name="status_sync_adapter_not_selected">No selected sync adapter</string>
+ <string name="binding_connected_format">Connected to Sync Adapter\n\tauthority: %s\n\taccount type: %s</string>
+ <string name="binding_not_connected">Not connected to a sync adapter</string>
+ <string name="binding_bind_failed">Bind failed</string>
+ <string name="binding_waiting_for_connection">Waiting for service to be connected...</string>
+ <string name="select_account_to_sync">Select account to sync</string>
</resources>