diff options
| author | Fred Quintana <fredq@google.com> | 2009-06-15 17:23:00 -0700 |
|---|---|---|
| committer | Fred Quintana <fredq@google.com> | 2009-06-16 15:25:58 -0700 |
| commit | ac657e02c01ded64fac6588de72434688ad5c0c3 (patch) | |
| tree | 7a3b9f3e84459ac64101999a261015f3c63402db /apps/Development/res | |
| parent | cb4821d09fc979d99347de0f941f442d71996e04 (diff) | |
| download | android_development-ac657e02c01ded64fac6588de72434688ad5c0c3.tar.gz android_development-ac657e02c01ded64fac6588de72434688ad5c0c3.tar.bz2 android_development-ac657e02c01ded64fac6588de72434688ad5c0c3.zip | |
a sample app that uses the AccountManager API
Diffstat (limited to 'apps/Development/res')
| -rw-r--r-- | apps/Development/res/layout/account_list_context_menu.xml | 34 | ||||
| -rw-r--r-- | apps/Development/res/layout/accounts_tester.xml | 84 | ||||
| -rw-r--r-- | apps/Development/res/layout/authenticators_list_item.xml | 43 | ||||
| -rw-r--r-- | apps/Development/res/layout/get_auth_token_view.xml | 36 | ||||
| -rw-r--r-- | apps/Development/res/values/strings.xml | 17 |
5 files changed, 214 insertions, 0 deletions
diff --git a/apps/Development/res/layout/account_list_context_menu.xml b/apps/Development/res/layout/account_list_context_menu.xml new file mode 100644 index 000000000..50e7ca1ee --- /dev/null +++ b/apps/Development/res/layout/account_list_context_menu.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 Google Inc. + + 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. +--> + +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:id="@+id/accounts_tester_remove_account" + android:title="@string/accounts_tester_remove_account" /> + + <item android:id="@+id/accounts_tester_get_auth_token" + android:title="@string/accounts_tester_get_auth_token" /> + + <item android:id="@+id/accounts_tester_invalidate_auth_token" + android:title="@string/accounts_tester_invalidate_auth_token" /> + + <item android:id="@+id/accounts_tester_update_credentials" + android:title="@string/accounts_tester_update_credentials" /> + + <item android:id="@+id/accounts_tester_confirm_credentials" + android:title="@string/accounts_tester_confirm_credentials" /> + +</menu> diff --git a/apps/Development/res/layout/accounts_tester.xml b/apps/Development/res/layout/accounts_tester.xml new file mode 100644 index 000000000..0a5b0d889 --- /dev/null +++ b/apps/Development/res/layout/accounts_tester.xml @@ -0,0 +1,84 @@ +<?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. +--> + +<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"> + + <LinearLayout + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <TextView android:id="@+id/accounts_tester_account_types_spinner_label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/accounts_tester_select_account_type"/> + + <Spinner android:id="@+id/accounts_tester_account_types_spinner" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + </LinearLayout> + + <ListView android:id="@+id/accounts_tester_authenticators_list" + android:layout_width="fill_parent" android:layout_height="fill_parent"/> + + <LinearLayout + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + <Button + android:id="@+id/accounts_tester_get_accounts_by_type" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/accounts_tester_get_accounts_by_type"/> + + <Button + android:id="@+id/accounts_tester_get_all_accounts" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/accounts_tester_get_all_accounts"/> + + <Button android:id="@+id/accounts_tester_add_account" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/accounts_tester_add_account"/> + + <Button android:id="@+id/accounts_tester_edit_properties" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/accounts_tester_edit_properties"/> + </LinearLayout> + </LinearLayout> + + <LinearLayout + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <ListView android:id="@+id/accounts_tester_accounts_list" + android:layout_width="fill_parent" android:layout_height="fill_parent"/> + + </LinearLayout> + +</LinearLayout> diff --git a/apps/Development/res/layout/authenticators_list_item.xml b/apps/Development/res/layout/authenticators_list_item.xml new file mode 100644 index 000000000..309a81887 --- /dev/null +++ b/apps/Development/res/layout/authenticators_list_item.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Copyright (C) 2008 Esmertec AG. + * Copyright (C) 2008 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:minHeight="?android:attr/listPreferredItemHeight" + android:paddingTop="1dip" + android:paddingBottom="1dip" + android:paddingLeft="9dip" + android:paddingRight="9dip"> + + <ImageView android:id="@+id/accounts_tester_authenticator_icon" + android:paddingRight="9dip" + android:layout_gravity="center_vertical" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + <TextView android:id="@+id/accounts_tester_authenticator_label" + android:layout_width="wrap_content" + android:layout_height="fill_parent" + android:gravity="center_vertical" + android:textAppearance="?android:attr/textAppearanceLarge" + android:layout_gravity="center_horizontal|center_vertical" /> +</LinearLayout> + diff --git a/apps/Development/res/layout/get_auth_token_view.xml b/apps/Development/res/layout/get_auth_token_view.xml new file mode 100644 index 000000000..f371523ce --- /dev/null +++ b/apps/Development/res/layout/get_auth_token_view.xml @@ -0,0 +1,36 @@ +<?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. +--> + +<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:id="@+id/accounts_tester_get_auth_token_dialog_message" + android:layout_width="fill_parent" android:layout_height="wrap_content" + android:text="@string/accounts_tester_enter_auth_token_type" /> + + <EditText android:id="@+id/accounts_tester_auth_token_type" + android:singleLine="true" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:minWidth="250dip" + android:scrollHorizontally="true" + android:capitalize="none" + android:autoText="false"/> + +</LinearLayout> diff --git a/apps/Development/res/values/strings.xml b/apps/Development/res/values/strings.xml index 4c84548bd..d3f6aa31f 100644 --- a/apps/Development/res/values/strings.xml +++ b/apps/Development/res/values/strings.xml @@ -133,4 +133,21 @@ <string name="perm_list_header_text">Apps using permission </string> <string name="source_uid_text">Source uid : </string> <string name="shared_pkgs_text">Packages accessing via shared uid : </string> + + <!-- AccountsTester --> + <string name="accounts_tester_app_name">Accounts Tester</string> + <string name="accounts_tester_get_accounts_by_type">Get Accounts By Type</string> + <string name="accounts_tester_get_all_accounts">Get All Accounts</string> + <string name="accounts_tester_add_account">Add Account</string> + <string name="accounts_tester_select_account_type">Select Account Type</string> + <string name="accounts_tester_process_name_header">Process Name:</string> + <string name="accounts_tester_remove_account">remove</string> + <string name="accounts_tester_get_auth_token">authenticate</string> + <string name="accounts_tester_invalidate_auth_token">invalidate token</string> + <string name="accounts_tester_account_context_menu_title">account operations</string> + <string name="accounts_tester_do_get_auth_token">Ok</string> + <string name="accounts_tester_enter_auth_token_type">Enter the authtoken type:</string> + <string name="accounts_tester_update_credentials">Update Credentials</string> + <string name="accounts_tester_confirm_credentials">Confirm Credentials</string> + <string name="accounts_tester_edit_properties">Edit Properties</string> </resources> |
