summaryrefslogtreecommitdiffstats
path: root/samples/ContactManager/res
diff options
context:
space:
mode:
authorTrevor Johns <tjohns@google.com>2009-11-24 05:16:35 -0800
committerTrevor Johns <tjohns@google.com>2009-12-08 16:51:39 -0800
commitc6d634b850ef17c77457b47e352a5136f78bd33f (patch)
tree7504fd9114e05f51b3727662b6b4262848e85ebc /samples/ContactManager/res
parenta7178809f6aecff7c4e3ae3374b7cba5adc692bf (diff)
downloadandroid_development-c6d634b850ef17c77457b47e352a5136f78bd33f.tar.gz
android_development-c6d634b850ef17c77457b47e352a5136f78bd33f.tar.bz2
android_development-c6d634b850ef17c77457b47e352a5136f78bd33f.zip
Adding ContactManager sample to SDK samples.
This sample demonstrates use of the ContactsContract classes introduced in API Level 5.
Diffstat (limited to 'samples/ContactManager/res')
-rw-r--r--samples/ContactManager/res/drawable-hdpi/icon.pngbin0 -> 4147 bytes
-rw-r--r--samples/ContactManager/res/drawable-ldpi/icon.pngbin0 -> 1723 bytes
-rw-r--r--samples/ContactManager/res/drawable-mdpi/icon.pngbin0 -> 2574 bytes
-rw-r--r--samples/ContactManager/res/layout/account_entry.xml49
-rw-r--r--samples/ContactManager/res/layout/contact_adder.xml80
-rw-r--r--samples/ContactManager/res/layout/contact_entry.xml24
-rw-r--r--samples/ContactManager/res/layout/contact_manager.xml33
-rw-r--r--samples/ContactManager/res/values/strings.xml33
8 files changed, 219 insertions, 0 deletions
diff --git a/samples/ContactManager/res/drawable-hdpi/icon.png b/samples/ContactManager/res/drawable-hdpi/icon.png
new file mode 100644
index 000000000..8074c4c57
--- /dev/null
+++ b/samples/ContactManager/res/drawable-hdpi/icon.png
Binary files differ
diff --git a/samples/ContactManager/res/drawable-ldpi/icon.png b/samples/ContactManager/res/drawable-ldpi/icon.png
new file mode 100644
index 000000000..1095584ec
--- /dev/null
+++ b/samples/ContactManager/res/drawable-ldpi/icon.png
Binary files differ
diff --git a/samples/ContactManager/res/drawable-mdpi/icon.png b/samples/ContactManager/res/drawable-mdpi/icon.png
new file mode 100644
index 000000000..a07c69fa5
--- /dev/null
+++ b/samples/ContactManager/res/drawable-mdpi/icon.png
Binary files differ
diff --git a/samples/ContactManager/res/layout/account_entry.xml b/samples/ContactManager/res/layout/account_entry.xml
new file mode 100644
index 000000000..435e73766
--- /dev/null
+++ b/samples/ContactManager/res/layout/account_entry.xml
@@ -0,0 +1,49 @@
+<?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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="?android:attr/listPreferredItemHeight"
+ android:padding="6dip">
+ <ImageView
+ android:id="@+id/accountIcon"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentBottom="true"
+ android:layout_marginRight="6dip" />
+ <TextView
+ android:id="@+id/secondAccountLine"
+ android:layout_width="fill_parent"
+ android:layout_height="26dip"
+ android:layout_toRightOf="@id/accountIcon"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentRight="true"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:textColor="@android:color/secondary_text_light" />
+ <TextView
+ android:id="@+id/firstAccountLine"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_toRightOf="@id/accountIcon"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:layout_above="@id/secondAccountLine"
+ android:layout_alignWithParentIfMissing="true"
+ android:gravity="center_vertical"
+ android:textColor="@android:color/primary_text_light"/>
+</RelativeLayout>
diff --git a/samples/ContactManager/res/layout/contact_adder.xml b/samples/ContactManager/res/layout/contact_adder.xml
new file mode 100644
index 000000000..92d06f305
--- /dev/null
+++ b/samples/ContactManager/res/layout/contact_adder.xml
@@ -0,0 +1,80 @@
+<?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.
+-->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+ <TableLayout android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+ <TableRow>
+ <TextView android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/targetAccountLabel"/>
+ </TableRow>
+ <TableRow>
+ <Spinner android:layout_height="wrap_content"
+ android:layout_width="fill_parent"
+ android:layout_weight="1"
+ android:id="@+id/accountSpinner"/>
+ </TableRow>
+ <TableRow>
+ <TextView android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/contactNameLabel"/>
+ </TableRow>
+ <TableRow>
+ <EditText android:id="@+id/contactNameEditText"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_weight="1"/>
+ </TableRow>
+ <TableRow>
+ <TextView android:text="@string/contactPhoneLabel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+ </TableRow>
+ <TableRow>
+ <EditText android:id="@+id/contactPhoneEditText"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_weight="1"/>
+ <Spinner android:id="@+id/contactPhoneTypeSpinner"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+ </TableRow>
+ <TableRow>
+ <TextView android:text="@string/contactEmailLabel"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+ </TableRow>
+ <TableRow>
+ <EditText android:id="@+id/contactEmailEditText"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_weight="1"/>
+ <Spinner android:id="@+id/contactEmailTypeSpinner"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+ </TableRow>
+ <TableRow>
+ <Button android:layout_height="wrap_content"
+ android:text="@string/save"
+ android:id="@+id/contactSaveButton"
+ android:layout_width="fill_parent"
+ android:layout_weight="1"/>
+ </TableRow>
+ </TableLayout>
+</ScrollView>
diff --git a/samples/ContactManager/res/layout/contact_entry.xml b/samples/ContactManager/res/layout/contact_entry.xml
new file mode 100644
index 000000000..9909025a7
--- /dev/null
+++ b/samples/ContactManager/res/layout/contact_entry.xml
@@ -0,0 +1,24 @@
+<?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:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+ <TextView android:text="@+id/contactEntryText"
+ android:id="@+id/contactEntryText"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"/>
+</LinearLayout>
diff --git a/samples/ContactManager/res/layout/contact_manager.xml b/samples/ContactManager/res/layout/contact_manager.xml
new file mode 100644
index 000000000..73f6f8151
--- /dev/null
+++ b/samples/ContactManager/res/layout/contact_manager.xml
@@ -0,0 +1,33 @@
+<?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">
+ <ListView android:layout_width="fill_parent"
+ android:id="@+id/contactList"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"/>
+ <CheckBox android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/showInvisible"
+ android:text="@string/showInvisible"/>
+ <Button android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:id="@+id/addContactButton"
+ android:text="@string/addContactButtonLabel"/>
+</LinearLayout>
diff --git a/samples/ContactManager/res/values/strings.xml b/samples/ContactManager/res/values/strings.xml
new file mode 100644
index 000000000..c7a65b4a0
--- /dev/null
+++ b/samples/ContactManager/res/values/strings.xml
@@ -0,0 +1,33 @@
+<?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.
+-->
+
+<resources>
+ <string name="accountSpinnerLabel">Account</string>
+ <string name="addContactButtonLabel">Add Contact</string>
+ <string name="addContactTitle">Add Contact</string>
+ <string name="allAccounts">All Accounts</string>
+ <string name="app_name">Contact Manager</string>
+ <string name="contactCreationFailure">Contact creation failed, check logs.</string>
+ <string name="contactEmailLabel">Contact Email</string>
+ <string name="contactNameLabel">Contact Name</string>
+ <string name="contactPhoneLabel">Contact Phone</string>
+ <string name="save">Save</string>
+ <string name="selectAccountLabel">Select</string>
+ <string name="selectLabel">Select label</string>
+ <string name="showInvisible">Show Invisible Contacts (Only)</string>
+ <string name="targetAccountLabel">Target Account</string>
+ <string name="undefinedTypeLabel">(Undefined)</string>
+</resources>