From 490e81a7b32f92de40debd62122dd3c793dc52ec Mon Sep 17 00:00:00 2001 From: Scott Kennedy Date: Thu, 10 Oct 2013 11:50:01 -0700 Subject: Merge chips from jb-ub-mail-ur11 into klp-ub-dev Change-Id: Ied8877d7613ca1dbb5047a0c8c611a1138fc47e3 --- chips/project.properties | 15 +++++++ chips/sample/Android.mk | 44 ++++++++++++++++++++ chips/sample/AndroidManifest.xml | 29 +++++++++++++ chips/sample/res/drawable-hdpi/ic_launcher.png | Bin 0 -> 9397 bytes chips/sample/res/drawable-mdpi/ic_launcher.png | Bin 0 -> 5237 bytes chips/sample/res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 14383 bytes chips/sample/res/layout/activity_main.xml | 36 +++++++++++++++++ chips/sample/res/values-af/strings.xml | 22 ++++++++++ chips/sample/res/values-am/strings.xml | 22 ++++++++++ chips/sample/res/values-ar/strings.xml | 22 ++++++++++ chips/sample/res/values-bg/strings.xml | 22 ++++++++++ chips/sample/res/values-ca/strings.xml | 22 ++++++++++ chips/sample/res/values-cs/strings.xml | 22 ++++++++++ chips/sample/res/values-da/strings.xml | 22 ++++++++++ chips/sample/res/values-de/strings.xml | 22 ++++++++++ chips/sample/res/values-el/strings.xml | 22 ++++++++++ chips/sample/res/values-en-rGB/strings.xml | 22 ++++++++++ chips/sample/res/values-en-rIN/strings.xml | 22 ++++++++++ chips/sample/res/values-es-rUS/strings.xml | 22 ++++++++++ chips/sample/res/values-es/strings.xml | 22 ++++++++++ chips/sample/res/values-et-rEE/strings.xml | 22 ++++++++++ chips/sample/res/values-fa/strings.xml | 22 ++++++++++ chips/sample/res/values-fi/strings.xml | 22 ++++++++++ chips/sample/res/values-fr-rCA/strings.xml | 22 ++++++++++ chips/sample/res/values-fr/strings.xml | 22 ++++++++++ chips/sample/res/values-hi/strings.xml | 22 ++++++++++ chips/sample/res/values-hr/strings.xml | 22 ++++++++++ chips/sample/res/values-hu/strings.xml | 22 ++++++++++ chips/sample/res/values-hy-rAM/strings.xml | 22 ++++++++++ chips/sample/res/values-in/strings.xml | 22 ++++++++++ chips/sample/res/values-it/strings.xml | 22 ++++++++++ chips/sample/res/values-iw/strings.xml | 22 ++++++++++ chips/sample/res/values-ja/strings.xml | 22 ++++++++++ chips/sample/res/values-ka-rGE/strings.xml | 22 ++++++++++ chips/sample/res/values-km-rKH/strings.xml | 22 ++++++++++ chips/sample/res/values-ko/strings.xml | 22 ++++++++++ chips/sample/res/values-lo-rLA/strings.xml | 22 ++++++++++ chips/sample/res/values-lt/strings.xml | 22 ++++++++++ chips/sample/res/values-lv/strings.xml | 22 ++++++++++ chips/sample/res/values-mn-rMN/strings.xml | 22 ++++++++++ chips/sample/res/values-ms-rMY/strings.xml | 22 ++++++++++ chips/sample/res/values-nb/strings.xml | 22 ++++++++++ chips/sample/res/values-nl/strings.xml | 22 ++++++++++ chips/sample/res/values-pl/strings.xml | 22 ++++++++++ chips/sample/res/values-pt-rPT/strings.xml | 22 ++++++++++ chips/sample/res/values-pt/strings.xml | 22 ++++++++++ chips/sample/res/values-ro/strings.xml | 22 ++++++++++ chips/sample/res/values-ru/strings.xml | 22 ++++++++++ chips/sample/res/values-sk/strings.xml | 22 ++++++++++ chips/sample/res/values-sl/strings.xml | 22 ++++++++++ chips/sample/res/values-sr/strings.xml | 22 ++++++++++ chips/sample/res/values-sv/strings.xml | 22 ++++++++++ chips/sample/res/values-sw/strings.xml | 22 ++++++++++ chips/sample/res/values-th/strings.xml | 22 ++++++++++ chips/sample/res/values-tl/strings.xml | 22 ++++++++++ chips/sample/res/values-tr/strings.xml | 22 ++++++++++ chips/sample/res/values-uk/strings.xml | 22 ++++++++++ chips/sample/res/values-vi/strings.xml | 22 ++++++++++ chips/sample/res/values-zh-rCN/strings.xml | 22 ++++++++++ chips/sample/res/values-zh-rHK/strings.xml | 22 ++++++++++ chips/sample/res/values-zh-rTW/strings.xml | 22 ++++++++++ chips/sample/res/values-zu/strings.xml | 22 ++++++++++ chips/sample/res/values/strings.xml | 22 ++++++++++ .../com/android/ex/chips/sample/MainActivity.java | 45 +++++++++++++++++++++ .../com/android/ex/chips/BaseRecipientAdapter.java | 3 +- .../android/ex/chips/RecipientEditTextView.java | 18 +++++---- chips/tests/AndroidManifest.xml | 4 +- .../tests/src/com/android/ex/chips/ChipsTest.java | 2 +- 68 files changed, 1415 insertions(+), 13 deletions(-) create mode 100644 chips/project.properties create mode 100644 chips/sample/Android.mk create mode 100644 chips/sample/AndroidManifest.xml create mode 100644 chips/sample/res/drawable-hdpi/ic_launcher.png create mode 100644 chips/sample/res/drawable-mdpi/ic_launcher.png create mode 100644 chips/sample/res/drawable-xhdpi/ic_launcher.png create mode 100644 chips/sample/res/layout/activity_main.xml create mode 100644 chips/sample/res/values-af/strings.xml create mode 100644 chips/sample/res/values-am/strings.xml create mode 100644 chips/sample/res/values-ar/strings.xml create mode 100644 chips/sample/res/values-bg/strings.xml create mode 100644 chips/sample/res/values-ca/strings.xml create mode 100644 chips/sample/res/values-cs/strings.xml create mode 100644 chips/sample/res/values-da/strings.xml create mode 100644 chips/sample/res/values-de/strings.xml create mode 100644 chips/sample/res/values-el/strings.xml create mode 100644 chips/sample/res/values-en-rGB/strings.xml create mode 100644 chips/sample/res/values-en-rIN/strings.xml create mode 100644 chips/sample/res/values-es-rUS/strings.xml create mode 100644 chips/sample/res/values-es/strings.xml create mode 100644 chips/sample/res/values-et-rEE/strings.xml create mode 100644 chips/sample/res/values-fa/strings.xml create mode 100644 chips/sample/res/values-fi/strings.xml create mode 100644 chips/sample/res/values-fr-rCA/strings.xml create mode 100644 chips/sample/res/values-fr/strings.xml create mode 100644 chips/sample/res/values-hi/strings.xml create mode 100644 chips/sample/res/values-hr/strings.xml create mode 100644 chips/sample/res/values-hu/strings.xml create mode 100644 chips/sample/res/values-hy-rAM/strings.xml create mode 100644 chips/sample/res/values-in/strings.xml create mode 100644 chips/sample/res/values-it/strings.xml create mode 100644 chips/sample/res/values-iw/strings.xml create mode 100644 chips/sample/res/values-ja/strings.xml create mode 100644 chips/sample/res/values-ka-rGE/strings.xml create mode 100644 chips/sample/res/values-km-rKH/strings.xml create mode 100644 chips/sample/res/values-ko/strings.xml create mode 100644 chips/sample/res/values-lo-rLA/strings.xml create mode 100644 chips/sample/res/values-lt/strings.xml create mode 100644 chips/sample/res/values-lv/strings.xml create mode 100644 chips/sample/res/values-mn-rMN/strings.xml create mode 100644 chips/sample/res/values-ms-rMY/strings.xml create mode 100644 chips/sample/res/values-nb/strings.xml create mode 100644 chips/sample/res/values-nl/strings.xml create mode 100644 chips/sample/res/values-pl/strings.xml create mode 100644 chips/sample/res/values-pt-rPT/strings.xml create mode 100644 chips/sample/res/values-pt/strings.xml create mode 100644 chips/sample/res/values-ro/strings.xml create mode 100644 chips/sample/res/values-ru/strings.xml create mode 100644 chips/sample/res/values-sk/strings.xml create mode 100644 chips/sample/res/values-sl/strings.xml create mode 100644 chips/sample/res/values-sr/strings.xml create mode 100644 chips/sample/res/values-sv/strings.xml create mode 100644 chips/sample/res/values-sw/strings.xml create mode 100644 chips/sample/res/values-th/strings.xml create mode 100644 chips/sample/res/values-tl/strings.xml create mode 100644 chips/sample/res/values-tr/strings.xml create mode 100644 chips/sample/res/values-uk/strings.xml create mode 100644 chips/sample/res/values-vi/strings.xml create mode 100644 chips/sample/res/values-zh-rCN/strings.xml create mode 100644 chips/sample/res/values-zh-rHK/strings.xml create mode 100644 chips/sample/res/values-zh-rTW/strings.xml create mode 100644 chips/sample/res/values-zu/strings.xml create mode 100644 chips/sample/res/values/strings.xml create mode 100644 chips/sample/src/com/android/ex/chips/sample/MainActivity.java (limited to 'chips') diff --git a/chips/project.properties b/chips/project.properties new file mode 100644 index 0000000..1b8c5a3 --- /dev/null +++ b/chips/project.properties @@ -0,0 +1,15 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-18 +android.library=true diff --git a/chips/sample/Android.mk b/chips/sample/Android.mk new file mode 100644 index 0000000..978aa7f --- /dev/null +++ b/chips/sample/Android.mk @@ -0,0 +1,44 @@ +# Copyright (C) 2013 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. + +LOCAL_PATH:= $(call my-dir) + +# Include res dir from chips +chips_dir := ../res +res_dirs := res $(chips_dir) + +################################################## +# Build APK +include $(CLEAR_VARS) + +src_dirs := src +LOCAL_PACKAGE_NAME := ChipsSample + +LOCAL_STATIC_JAVA_LIBRARIES += android-common-chips + +LOCAL_SDK_VERSION := 18 + +LOCAL_SRC_FILES := $(call all-java-files-under, src) \ + $(call all-logtags-files-under, $(src_dirs)) +LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs)) +LOCAL_AAPT_FLAGS := --auto-add-overlay +LOCAL_AAPT_FLAGS += --extra-packages com.android.ex.chips + +include $(BUILD_PACKAGE) + + +################################################## +# Build all sub-directories + +include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/chips/sample/AndroidManifest.xml b/chips/sample/AndroidManifest.xml new file mode 100644 index 0000000..a490e29 --- /dev/null +++ b/chips/sample/AndroidManifest.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/chips/sample/res/drawable-hdpi/ic_launcher.png b/chips/sample/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..96a442e Binary files /dev/null and b/chips/sample/res/drawable-hdpi/ic_launcher.png differ diff --git a/chips/sample/res/drawable-mdpi/ic_launcher.png b/chips/sample/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..359047d Binary files /dev/null and b/chips/sample/res/drawable-mdpi/ic_launcher.png differ diff --git a/chips/sample/res/drawable-xhdpi/ic_launcher.png b/chips/sample/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..71c6d76 Binary files /dev/null and b/chips/sample/res/drawable-xhdpi/ic_launcher.png differ diff --git a/chips/sample/res/layout/activity_main.xml b/chips/sample/res/layout/activity_main.xml new file mode 100644 index 0000000..01a9ff3 --- /dev/null +++ b/chips/sample/res/layout/activity_main.xml @@ -0,0 +1,36 @@ + + + + + + + + \ No newline at end of file diff --git a/chips/sample/res/values-af/strings.xml b/chips/sample/res/values-af/strings.xml new file mode 100644 index 0000000..e4c4945 --- /dev/null +++ b/chips/sample/res/values-af/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips-voorbeeld" + "E-posadresse" + "Foonnommers" + diff --git a/chips/sample/res/values-am/strings.xml b/chips/sample/res/values-am/strings.xml new file mode 100644 index 0000000..d19c4e8 --- /dev/null +++ b/chips/sample/res/values-am/strings.xml @@ -0,0 +1,22 @@ + + + + + "የቺፕስ ናሙና" + "የኢሜይል አድራሻዎች" + "ስልክ ቁጥሮች" + diff --git a/chips/sample/res/values-ar/strings.xml b/chips/sample/res/values-ar/strings.xml new file mode 100644 index 0000000..4492ec7 --- /dev/null +++ b/chips/sample/res/values-ar/strings.xml @@ -0,0 +1,22 @@ + + + + + "عينة شرائح" + "عناوين البريد الإلكتروني" + "أرقام الهواتف" + diff --git a/chips/sample/res/values-bg/strings.xml b/chips/sample/res/values-bg/strings.xml new file mode 100644 index 0000000..4c118c1 --- /dev/null +++ b/chips/sample/res/values-bg/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "Имейл адреси" + "Телефонни номера" + diff --git a/chips/sample/res/values-ca/strings.xml b/chips/sample/res/values-ca/strings.xml new file mode 100644 index 0000000..847cc6f --- /dev/null +++ b/chips/sample/res/values-ca/strings.xml @@ -0,0 +1,22 @@ + + + + + "Mostra de xips" + "Adreces electròniques" + "Números de telèfon" + diff --git a/chips/sample/res/values-cs/strings.xml b/chips/sample/res/values-cs/strings.xml new file mode 100644 index 0000000..3e0a928 --- /dev/null +++ b/chips/sample/res/values-cs/strings.xml @@ -0,0 +1,22 @@ + + + + + "Vzorové čipy" + "E-mailové adresy" + "Telefonní čísla" + diff --git a/chips/sample/res/values-da/strings.xml b/chips/sample/res/values-da/strings.xml new file mode 100644 index 0000000..e55fcc6 --- /dev/null +++ b/chips/sample/res/values-da/strings.xml @@ -0,0 +1,22 @@ + + + + + "Eksempel på chips" + "E-mailadresser" + "Telefonnumre" + diff --git a/chips/sample/res/values-de/strings.xml b/chips/sample/res/values-de/strings.xml new file mode 100644 index 0000000..614081c --- /dev/null +++ b/chips/sample/res/values-de/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "E-Mail-Adressen" + "Telefonnummern" + diff --git a/chips/sample/res/values-el/strings.xml b/chips/sample/res/values-el/strings.xml new file mode 100644 index 0000000..a90018a --- /dev/null +++ b/chips/sample/res/values-el/strings.xml @@ -0,0 +1,22 @@ + + + + + "Δείγμα τσιπ" + "Διευθύνσεις ηλεκτρονικού ταχυδρομείου" + "Αριθμοί τηλεφώνου" + diff --git a/chips/sample/res/values-en-rGB/strings.xml b/chips/sample/res/values-en-rGB/strings.xml new file mode 100644 index 0000000..aaccb10 --- /dev/null +++ b/chips/sample/res/values-en-rGB/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "Email Addresses" + "Phone Numbers" + diff --git a/chips/sample/res/values-en-rIN/strings.xml b/chips/sample/res/values-en-rIN/strings.xml new file mode 100644 index 0000000..aaccb10 --- /dev/null +++ b/chips/sample/res/values-en-rIN/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "Email Addresses" + "Phone Numbers" + diff --git a/chips/sample/res/values-es-rUS/strings.xml b/chips/sample/res/values-es-rUS/strings.xml new file mode 100644 index 0000000..e314778 --- /dev/null +++ b/chips/sample/res/values-es-rUS/strings.xml @@ -0,0 +1,22 @@ + + + + + "Muestra de chips" + "Direcciones de correo electrónico" + "Números de teléfono" + diff --git a/chips/sample/res/values-es/strings.xml b/chips/sample/res/values-es/strings.xml new file mode 100644 index 0000000..dd64514 --- /dev/null +++ b/chips/sample/res/values-es/strings.xml @@ -0,0 +1,22 @@ + + + + + "Muestra de Chips" + "Direcciones de correo electrónico" + "Números de teléfono" + diff --git a/chips/sample/res/values-et-rEE/strings.xml b/chips/sample/res/values-et-rEE/strings.xml new file mode 100644 index 0000000..5c7d6e5 --- /dev/null +++ b/chips/sample/res/values-et-rEE/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "E-posti aadressid" + "Telefoninumbrid" + diff --git a/chips/sample/res/values-fa/strings.xml b/chips/sample/res/values-fa/strings.xml new file mode 100644 index 0000000..8ee4162 --- /dev/null +++ b/chips/sample/res/values-fa/strings.xml @@ -0,0 +1,22 @@ + + + + + "نمونه تراشه‌ها" + "آدرس‌های ایمیل" + "شماره‌ تلفن‌ها" + diff --git a/chips/sample/res/values-fi/strings.xml b/chips/sample/res/values-fi/strings.xml new file mode 100644 index 0000000..c72df4d --- /dev/null +++ b/chips/sample/res/values-fi/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "Sähköpostiosoitteet" + "Puhelinnumerot" + diff --git a/chips/sample/res/values-fr-rCA/strings.xml b/chips/sample/res/values-fr-rCA/strings.xml new file mode 100644 index 0000000..e88de2d --- /dev/null +++ b/chips/sample/res/values-fr-rCA/strings.xml @@ -0,0 +1,22 @@ + + + + + "Échantillon Chips" + "Adresses de courriel" + "Numéros de téléphone" + diff --git a/chips/sample/res/values-fr/strings.xml b/chips/sample/res/values-fr/strings.xml new file mode 100644 index 0000000..2b1c18e --- /dev/null +++ b/chips/sample/res/values-fr/strings.xml @@ -0,0 +1,22 @@ + + + + + "Échantillon Chips" + "Adresses e-mail" + "Numéros de téléphone" + diff --git a/chips/sample/res/values-hi/strings.xml b/chips/sample/res/values-hi/strings.xml new file mode 100644 index 0000000..bae6585 --- /dev/null +++ b/chips/sample/res/values-hi/strings.xml @@ -0,0 +1,22 @@ + + + + + "चिप्‍स नमूने" + "ईमेल पते" + "फ़ोन नंबर" + diff --git a/chips/sample/res/values-hr/strings.xml b/chips/sample/res/values-hr/strings.xml new file mode 100644 index 0000000..6eb8a8e --- /dev/null +++ b/chips/sample/res/values-hr/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "E-adrese" + "Telefonski brojevi" + diff --git a/chips/sample/res/values-hu/strings.xml b/chips/sample/res/values-hu/strings.xml new file mode 100644 index 0000000..1d00752 --- /dev/null +++ b/chips/sample/res/values-hu/strings.xml @@ -0,0 +1,22 @@ + + + + + "„Chips” minta" + "E-mail címek" + "Telefonszámok" + diff --git a/chips/sample/res/values-hy-rAM/strings.xml b/chips/sample/res/values-hy-rAM/strings.xml new file mode 100644 index 0000000..fbdcb21 --- /dev/null +++ b/chips/sample/res/values-hy-rAM/strings.xml @@ -0,0 +1,22 @@ + + + + + "Չիպերի նմուշ" + "Էլփոստի հասցեներ" + "Հեռախոսահամարներ" + diff --git a/chips/sample/res/values-in/strings.xml b/chips/sample/res/values-in/strings.xml new file mode 100644 index 0000000..1ebd148 --- /dev/null +++ b/chips/sample/res/values-in/strings.xml @@ -0,0 +1,22 @@ + + + + + "Contoh Chip" + "Alamat Email" + "Nomor Telepon" + diff --git a/chips/sample/res/values-it/strings.xml b/chips/sample/res/values-it/strings.xml new file mode 100644 index 0000000..aefbd01 --- /dev/null +++ b/chips/sample/res/values-it/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "Indirizzi email" + "Numeri di telefono" + diff --git a/chips/sample/res/values-iw/strings.xml b/chips/sample/res/values-iw/strings.xml new file mode 100644 index 0000000..24c7e69 --- /dev/null +++ b/chips/sample/res/values-iw/strings.xml @@ -0,0 +1,22 @@ + + + + + "דוגמאות שבבים" + "כתובות דוא\"ל" + "מספרי טלפון" + diff --git a/chips/sample/res/values-ja/strings.xml b/chips/sample/res/values-ja/strings.xml new file mode 100644 index 0000000..c75120a --- /dev/null +++ b/chips/sample/res/values-ja/strings.xml @@ -0,0 +1,22 @@ + + + + + "チップサンプル" + "メールアドレス" + "電話番号" + diff --git a/chips/sample/res/values-ka-rGE/strings.xml b/chips/sample/res/values-ka-rGE/strings.xml new file mode 100644 index 0000000..a21dab5 --- /dev/null +++ b/chips/sample/res/values-ka-rGE/strings.xml @@ -0,0 +1,22 @@ + + + + + "ჩიპების ნიმუში" + "ელფოსტის მისამართები" + "ტელეფონის ნომრები" + diff --git a/chips/sample/res/values-km-rKH/strings.xml b/chips/sample/res/values-km-rKH/strings.xml new file mode 100644 index 0000000..3730a7d --- /dev/null +++ b/chips/sample/res/values-km-rKH/strings.xml @@ -0,0 +1,22 @@ + + + + + "គំរូ​បន្ទះ​សៀគ្វី" + "អាសយដ្ឋាន​អ៊ីមែល" + "លេខទូរស័ព្ទ" + diff --git a/chips/sample/res/values-ko/strings.xml b/chips/sample/res/values-ko/strings.xml new file mode 100644 index 0000000..24d2793 --- /dev/null +++ b/chips/sample/res/values-ko/strings.xml @@ -0,0 +1,22 @@ + + + + + "칩 샘플" + "이메일 주소" + "전화번호" + diff --git a/chips/sample/res/values-lo-rLA/strings.xml b/chips/sample/res/values-lo-rLA/strings.xml new file mode 100644 index 0000000..6357807 --- /dev/null +++ b/chips/sample/res/values-lo-rLA/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "ທີ່ຢູ່ອີເມວ" + "ເບີໂທລະສັບ:" + diff --git a/chips/sample/res/values-lt/strings.xml b/chips/sample/res/values-lt/strings.xml new file mode 100644 index 0000000..b966062 --- /dev/null +++ b/chips/sample/res/values-lt/strings.xml @@ -0,0 +1,22 @@ + + + + + "Lustų pavyzdžiai" + "El. pašto adresai" + "Telefonų numeriai" + diff --git a/chips/sample/res/values-lv/strings.xml b/chips/sample/res/values-lv/strings.xml new file mode 100644 index 0000000..fec05b5 --- /dev/null +++ b/chips/sample/res/values-lv/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "E-pasta adreses" + "Tālruņa numuri" + diff --git a/chips/sample/res/values-mn-rMN/strings.xml b/chips/sample/res/values-mn-rMN/strings.xml new file mode 100644 index 0000000..5289e5c --- /dev/null +++ b/chips/sample/res/values-mn-rMN/strings.xml @@ -0,0 +1,22 @@ + + + + + "Чипний дээж" + "Имэйл хаягууд" + "Утасны дугаарууд" + diff --git a/chips/sample/res/values-ms-rMY/strings.xml b/chips/sample/res/values-ms-rMY/strings.xml new file mode 100644 index 0000000..12ab807 --- /dev/null +++ b/chips/sample/res/values-ms-rMY/strings.xml @@ -0,0 +1,22 @@ + + + + + "Sampel Cip" + "Alamat E-mel" + "Nombor Telefon" + diff --git a/chips/sample/res/values-nb/strings.xml b/chips/sample/res/values-nb/strings.xml new file mode 100644 index 0000000..3bff3e2 --- /dev/null +++ b/chips/sample/res/values-nb/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips-eksempel" + "E-postadresser" + "Telefonnumre" + diff --git a/chips/sample/res/values-nl/strings.xml b/chips/sample/res/values-nl/strings.xml new file mode 100644 index 0000000..8951311 --- /dev/null +++ b/chips/sample/res/values-nl/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chipsvoorbeeld" + "E-mailadressen" + "Telefoonnummers" + diff --git a/chips/sample/res/values-pl/strings.xml b/chips/sample/res/values-pl/strings.xml new file mode 100644 index 0000000..fedec0d --- /dev/null +++ b/chips/sample/res/values-pl/strings.xml @@ -0,0 +1,22 @@ + + + + + "Próbka chipsów" + "Adresy e-mail" + "Numery telefonów" + diff --git a/chips/sample/res/values-pt-rPT/strings.xml b/chips/sample/res/values-pt-rPT/strings.xml new file mode 100644 index 0000000..951d30a --- /dev/null +++ b/chips/sample/res/values-pt-rPT/strings.xml @@ -0,0 +1,22 @@ + + + + + "Amostra de Chips" + "Endereços de email" + "Números de telefone" + diff --git a/chips/sample/res/values-pt/strings.xml b/chips/sample/res/values-pt/strings.xml new file mode 100644 index 0000000..9d2e732 --- /dev/null +++ b/chips/sample/res/values-pt/strings.xml @@ -0,0 +1,22 @@ + + + + + "Amostra de chips" + "Endereços de e-mail" + "Números de telefone" + diff --git a/chips/sample/res/values-ro/strings.xml b/chips/sample/res/values-ro/strings.xml new file mode 100644 index 0000000..bcffb5e --- /dev/null +++ b/chips/sample/res/values-ro/strings.xml @@ -0,0 +1,22 @@ + + + + + "Mostră Chips" + "Adrese de e-mail" + "Numere de telefon" + diff --git a/chips/sample/res/values-ru/strings.xml b/chips/sample/res/values-ru/strings.xml new file mode 100644 index 0000000..10f052e --- /dev/null +++ b/chips/sample/res/values-ru/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "Адреса эл. почты" + "Номера телефонов" + diff --git a/chips/sample/res/values-sk/strings.xml b/chips/sample/res/values-sk/strings.xml new file mode 100644 index 0000000..1297298 --- /dev/null +++ b/chips/sample/res/values-sk/strings.xml @@ -0,0 +1,22 @@ + + + + + "Ukážka čipov" + "E-mailové adresy" + "Telefónne čísla" + diff --git a/chips/sample/res/values-sl/strings.xml b/chips/sample/res/values-sl/strings.xml new file mode 100644 index 0000000..0e1c855 --- /dev/null +++ b/chips/sample/res/values-sl/strings.xml @@ -0,0 +1,22 @@ + + + + + "Vzorec čipov" + "E-poštni naslovi" + "Telefonske številke" + diff --git a/chips/sample/res/values-sr/strings.xml b/chips/sample/res/values-sr/strings.xml new file mode 100644 index 0000000..dbd91a5 --- /dev/null +++ b/chips/sample/res/values-sr/strings.xml @@ -0,0 +1,22 @@ + + + + + "Пример чипова" + "Адресе е-поште" + "Бројеви телефона" + diff --git a/chips/sample/res/values-sv/strings.xml b/chips/sample/res/values-sv/strings.xml new file mode 100644 index 0000000..d787c85 --- /dev/null +++ b/chips/sample/res/values-sv/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chipsprov" + "E-postadresser" + "Telefonnummer" + diff --git a/chips/sample/res/values-sw/strings.xml b/chips/sample/res/values-sw/strings.xml new file mode 100644 index 0000000..5afd792 --- /dev/null +++ b/chips/sample/res/values-sw/strings.xml @@ -0,0 +1,22 @@ + + + + + "Sampuli ya Chips" + "Anwani za Barua Pepe" + "Nambari za Simu" + diff --git a/chips/sample/res/values-th/strings.xml b/chips/sample/res/values-th/strings.xml new file mode 100644 index 0000000..80bf67d --- /dev/null +++ b/chips/sample/res/values-th/strings.xml @@ -0,0 +1,22 @@ + + + + + "ตัวอย่างชิป" + "ที่อยู่อีเมล" + "หมายเลขโทรศัพท์" + diff --git a/chips/sample/res/values-tl/strings.xml b/chips/sample/res/values-tl/strings.xml new file mode 100644 index 0000000..411e0d4 --- /dev/null +++ b/chips/sample/res/values-tl/strings.xml @@ -0,0 +1,22 @@ + + + + + "Sample ng Mga Chip" + "Mga Email Address" + "Mga Numero ng Telepono" + diff --git a/chips/sample/res/values-tr/strings.xml b/chips/sample/res/values-tr/strings.xml new file mode 100644 index 0000000..dad01bb --- /dev/null +++ b/chips/sample/res/values-tr/strings.xml @@ -0,0 +1,22 @@ + + + + + "Fiş Örneği" + "E-posta Adresleri" + "Telefon Numaraları" + diff --git a/chips/sample/res/values-uk/strings.xml b/chips/sample/res/values-uk/strings.xml new file mode 100644 index 0000000..f09cb8c --- /dev/null +++ b/chips/sample/res/values-uk/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "Електронні адреси" + "Номери телефонів" + diff --git a/chips/sample/res/values-vi/strings.xml b/chips/sample/res/values-vi/strings.xml new file mode 100644 index 0000000..b9bc474 --- /dev/null +++ b/chips/sample/res/values-vi/strings.xml @@ -0,0 +1,22 @@ + + + + + "Mẫu chip" + "Địa chỉ email" + "Số điện thoại" + diff --git a/chips/sample/res/values-zh-rCN/strings.xml b/chips/sample/res/values-zh-rCN/strings.xml new file mode 100644 index 0000000..ebee45c --- /dev/null +++ b/chips/sample/res/values-zh-rCN/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "电子邮件地址" + "电话号码" + diff --git a/chips/sample/res/values-zh-rHK/strings.xml b/chips/sample/res/values-zh-rHK/strings.xml new file mode 100644 index 0000000..d2c3bb0 --- /dev/null +++ b/chips/sample/res/values-zh-rHK/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "電郵地址" + "電話號碼" + diff --git a/chips/sample/res/values-zh-rTW/strings.xml b/chips/sample/res/values-zh-rTW/strings.xml new file mode 100644 index 0000000..b502833 --- /dev/null +++ b/chips/sample/res/values-zh-rTW/strings.xml @@ -0,0 +1,22 @@ + + + + + "Chips Sample" + "電子郵件地址" + "電話號碼" + diff --git a/chips/sample/res/values-zu/strings.xml b/chips/sample/res/values-zu/strings.xml new file mode 100644 index 0000000..6a106b7 --- /dev/null +++ b/chips/sample/res/values-zu/strings.xml @@ -0,0 +1,22 @@ + + + + + "Isempula yama-chip" + "Amakheli we-imeyili" + "Izinombolo zefoni" + diff --git a/chips/sample/res/values/strings.xml b/chips/sample/res/values/strings.xml new file mode 100644 index 0000000..c765231 --- /dev/null +++ b/chips/sample/res/values/strings.xml @@ -0,0 +1,22 @@ + + + + + Chips Sample + Email Addresses + Phone Numbers + + diff --git a/chips/sample/src/com/android/ex/chips/sample/MainActivity.java b/chips/sample/src/com/android/ex/chips/sample/MainActivity.java new file mode 100644 index 0000000..0622e65 --- /dev/null +++ b/chips/sample/src/com/android/ex/chips/sample/MainActivity.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2013 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. + */ +package com.android.ex.chips.sample; + +import android.os.Bundle; +import android.text.util.Rfc822Tokenizer; +import android.widget.MultiAutoCompleteTextView; +import android.app.Activity; + +import com.android.ex.chips.BaseRecipientAdapter; +import com.android.ex.chips.RecipientEditTextView; + +public class MainActivity extends Activity { + + @Override + protected void onCreate(final Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + final RecipientEditTextView emailRetv = + (RecipientEditTextView) findViewById(R.id.email_retv); + emailRetv.setTokenizer(new Rfc822Tokenizer()); + emailRetv.setAdapter(new BaseRecipientAdapter(this) { }); + + final RecipientEditTextView phoneRetv = + (RecipientEditTextView) findViewById(R.id.phone_retv); + phoneRetv.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer()); + phoneRetv.setAdapter( + new BaseRecipientAdapter(BaseRecipientAdapter.QUERY_TYPE_PHONE, this) { }); + } + +} diff --git a/chips/src/com/android/ex/chips/BaseRecipientAdapter.java b/chips/src/com/android/ex/chips/BaseRecipientAdapter.java index d9eb64e..0cec101 100644 --- a/chips/src/com/android/ex/chips/BaseRecipientAdapter.java +++ b/chips/src/com/android/ex/chips/BaseRecipientAdapter.java @@ -455,7 +455,6 @@ public abstract class BaseRecipientAdapter extends BaseAdapter implements Filter private final LayoutInflater mInflater; private Account mAccount; private final int mPreferredMaxResultCount; - private final Handler mHandler = new Handler(); /** * {@link #mEntries} is responsible for showing every result for this Adapter. To @@ -909,7 +908,7 @@ public abstract class BaseRecipientAdapter extends BaseAdapter implements Filter } @Override - public Object getItem(int position) { + public RecipientEntry getItem(int position) { return getEntries().get(position); } diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java index e300354..2c4553f 100644 --- a/chips/src/com/android/ex/chips/RecipientEditTextView.java +++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java @@ -611,8 +611,7 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements // was selected. if (photoBytes == null && contact.getPhotoThumbnailUri() != null) { // TODO: cache this in the recipient entry? - ((BaseRecipientAdapter) getAdapter()).fetchPhoto(contact, contact - .getPhotoThumbnailUri()); + getAdapter().fetchPhoto(contact, contact.getPhotoThumbnailUri()); photoBytes = contact.getPhotoBytes(); } @@ -1497,7 +1496,7 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements private ListAdapter createAlternatesAdapter(DrawableRecipientChip chip) { return new RecipientAlternatesAdapter(getContext(), chip.getContactId(), chip.getDataId(), - ((BaseRecipientAdapter)getAdapter()).getQueryType(), this); + getAdapter().getQueryType(), this); } private ListAdapter createSingleAddressAdapter(DrawableRecipientChip currentChip) { @@ -1661,8 +1660,7 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements } private void submitItemAtPosition(int position) { - RecipientEntry entry = createValidatedEntry( - (RecipientEntry)getAdapter().getItem(position)); + RecipientEntry entry = createValidatedEntry(getAdapter().getItem(position)); if (entry == null) { return; } @@ -2635,7 +2633,7 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements } final BaseRecipientAdapter adapter = (BaseRecipientAdapter) getAdapter(); RecipientAlternatesAdapter.getMatchingRecipients(getContext(), adapter, addresses, - ((BaseRecipientAdapter) getAdapter()).getAccount(), + adapter.getAccount(), new RecipientMatchCallback() { @Override @@ -2862,7 +2860,11 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements protected boolean isPhoneQuery() { return getAdapter() != null - && ((BaseRecipientAdapter) getAdapter()).getQueryType() - == BaseRecipientAdapter.QUERY_TYPE_PHONE; + && getAdapter().getQueryType() == BaseRecipientAdapter.QUERY_TYPE_PHONE; + } + + @Override + public BaseRecipientAdapter getAdapter() { + return (BaseRecipientAdapter) super.getAdapter(); } } diff --git a/chips/tests/AndroidManifest.xml b/chips/tests/AndroidManifest.xml index b84aecf..b2b307e 100644 --- a/chips/tests/AndroidManifest.xml +++ b/chips/tests/AndroidManifest.xml @@ -15,7 +15,7 @@ --> @@ -24,7 +24,7 @@ diff --git a/chips/tests/src/com/android/ex/chips/ChipsTest.java b/chips/tests/src/com/android/ex/chips/ChipsTest.java index 7963086..9116e26 100644 --- a/chips/tests/src/com/android/ex/chips/ChipsTest.java +++ b/chips/tests/src/com/android/ex/chips/ChipsTest.java @@ -32,7 +32,7 @@ import com.android.ex.chips.BaseRecipientAdapter; import com.android.ex.chips.RecipientEditTextView; import com.android.ex.chips.RecipientEntry; import com.android.ex.chips.recipientchip.DrawableRecipientChip; -import com.android.ex.chips.recipientchip.VisibleRecipientChip;; +import com.android.ex.chips.recipientchip.VisibleRecipientChip; import java.util.regex.Pattern; -- cgit v1.2.3