diff options
| author | Fabrice Di Meglio <fdimeglio@google.com> | 2011-01-17 17:37:55 -0800 |
|---|---|---|
| committer | Fabrice Di Meglio <fdimeglio@google.com> | 2011-01-18 13:31:33 -0800 |
| commit | ac3b18ffe1964d0446e164a73b11794d3d6505b0 (patch) | |
| tree | 81d8efebb1bce1deb1a5fb72baa6373b57e004d2 /apps/Development/res | |
| parent | e8afb7e327d6eb5beeeffd7b32a2adb6b7a4cabc (diff) | |
| download | android_development-ac3b18ffe1964d0446e164a73b11794d3d6505b0.tar.gz android_development-ac3b18ffe1964d0446e164a73b11794d3d6505b0.tar.bz2 android_development-ac3b18ffe1964d0446e164a73b11794d3d6505b0.zip | |
Update account tester
- update Theme to use default one
- AccountManager.getAuthTokenByFeatures() can be called thru a button
- code refactoring and cleaning
Change-Id: I1b4cfb340d9ed1506541fb9faf349f50d05df472
Diffstat (limited to 'apps/Development/res')
| -rw-r--r-- | apps/Development/res/layout/accounts_tester.xml | 192 | ||||
| -rw-r--r-- | apps/Development/res/layout/get_auth_token_view.xml | 3 | ||||
| -rw-r--r-- | apps/Development/res/layout/get_features_view.xml | 51 | ||||
| -rw-r--r-- | apps/Development/res/values/strings.xml | 4 |
4 files changed, 157 insertions, 93 deletions
diff --git a/apps/Development/res/layout/accounts_tester.xml b/apps/Development/res/layout/accounts_tester.xml index df7c73fe4..28f1b4e2e 100644 --- a/apps/Development/res/layout/accounts_tester.xml +++ b/apps/Development/res/layout/accounts_tester.xml @@ -14,100 +14,110 @@ limitations under the License. --> -<LinearLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <LinearLayout - android:orientation="horizontal" - android:layout_width="match_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> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - <LinearLayout - android:orientation="horizontal" - android:layout_width="match_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 - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - <TextView android:id="@+id/accounts_tester_desiredFeatures" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/accounts_tester_desired_features_label"/> - - <EditText android:id="@+id/accounts_tester_desired_features" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:minEms="15"/> - </LinearLayout> - <LinearLayout - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - <TextView android:id="@+id/accounts_tester_desiredFeatures" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/accounts_tester_desired_authtokentype_label"/> - - <EditText android:id="@+id/accounts_tester_desired_authtokentype" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:minEms="15"/> - </LinearLayout> - </LinearLayout> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" + android:layout_width="match_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> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" + android:layout_width="match_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"/> + + <Button android:id="@+id/accounts_tester_get_auth_token_by_type_and_feature" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/accounts_tester_get_auth_token_by_type_and_feature"/> + + </LinearLayout> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <TextView android:id="@+id/accounts_tester_desiredFeatures" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/accounts_tester_desired_features_label"/> + + <EditText android:id="@+id/accounts_tester_desired_features" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:minEms="15"/> + </LinearLayout> + + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <TextView android:id="@+id/accounts_tester_desiredFeatures" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/accounts_tester_desired_authtokentype_label"/> + + <EditText android:id="@+id/accounts_tester_desired_authtokentype" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:minEms="15"/> + </LinearLayout> + </LinearLayout> </LinearLayout> - <LinearLayout - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content"> + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content"> - <ListView android:id="@+id/accounts_tester_accounts_list" - android:layout_width="match_parent" android:layout_height="match_parent"/> + <ListView android:id="@+id/accounts_tester_accounts_list" + android:layout_width="match_parent" android:layout_height="match_parent"/> </LinearLayout> diff --git a/apps/Development/res/layout/get_auth_token_view.xml b/apps/Development/res/layout/get_auth_token_view.xml index c014cad60..cfaed321c 100644 --- a/apps/Development/res/layout/get_auth_token_view.xml +++ b/apps/Development/res/layout/get_auth_token_view.xml @@ -21,7 +21,8 @@ android:layout_height="match_parent"> <TextView android:id="@+id/accounts_tester_get_auth_token_dialog_message" - android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_width="match_parent" + android:layout_height="wrap_content" android:text="@string/accounts_tester_enter_auth_token_type" /> <EditText android:id="@+id/accounts_tester_auth_token_type" diff --git a/apps/Development/res/layout/get_features_view.xml b/apps/Development/res/layout/get_features_view.xml new file mode 100644 index 000000000..02fde2878 --- /dev/null +++ b/apps/Development/res/layout/get_features_view.xml @@ -0,0 +1,51 @@ +<?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. +--> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <TextView android:id="@+id/accounts_tester_get_auth_token_dialog_message" + android:layout_width="match_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="match_parent" + android:layout_height="wrap_content" + android:minWidth="250dip" + android:scrollHorizontally="true" + android:capitalize="none" + android:autoText="false"/> + + <TextView android:id="@+id/accounts_tester_get_features_dialog_message" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/accounts_tester_enter_features" /> + + <EditText android:id="@+id/accounts_tester_features" + android:singleLine="true" + android:layout_width="match_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 422bd7f59..5d8a927ae 100644 --- a/apps/Development/res/values/strings.xml +++ b/apps/Development/res/values/strings.xml @@ -171,11 +171,13 @@ <string name="accounts_tester_process_name_header">Process Name:</string> <string name="accounts_tester_remove_account">Remove Account</string> <string name="accounts_tester_get_auth_token">Get Auth Token</string> + <string name="accounts_tester_get_auth_token_by_type_and_feature">Get Auth Token By Type/Feature</string> <string name="accounts_tester_test_has_features">Has Features</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_ok_button">Ok</string> <string name="accounts_tester_enter_auth_token_type">Enter the authtoken type:</string> + <string name="accounts_tester_enter_features">Enter the features separated by a space:</string> <string name="accounts_tester_update_credentials">Update Credentials</string> <string name="accounts_tester_confirm_credentials">Confirm Credentials</string> <string name="accounts_tester_clear_password">Clear Password</string> |
