Fixing chips so they can be built with sdk 21.
am: f459447

* commit 'f4594479c9861ab540e654bf8e504c2555ea90d0':
  Fixing chips so they can be built with sdk 21.
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
new file mode 100644
index 0000000..672ff26
--- /dev/null
+++ b/res/values-b+sr+Latn/strings.xml
@@ -0,0 +1,27 @@
+<?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.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
+    <string name="copy_email" msgid="7869435992461603532">"Kopiraj imejl adresu"</string>
+    <string name="copy_number" msgid="530057841276106843">"Kopiraj broj telefona"</string>
+    <string name="action_label" msgid="1318401633653605424">"Return"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Predlozi za kontakte su otvoreni"</string>
+    <string name="dropdown_delete_button_desc" msgid="8506791557733906887">"Uklonite <xliff:g id="CONTACT">%s</xliff:g> iz primalaca"</string>
+    <string name="chips_action_copy" msgid="1929144660075507103">"Kopiraj"</string>
+    <string name="chips_action_cancel" msgid="6077877438943543501">"Otkaži"</string>
+</resources>
diff --git a/res/values-pt-rBR/strings.xml b/res/values-pt-rBR/strings.xml
new file mode 100644
index 0000000..3d8ad29
--- /dev/null
+++ b/res/values-pt-rBR/strings.xml
@@ -0,0 +1,27 @@
+<?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.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
+    <string name="copy_email" msgid="7869435992461603532">"Copiar endereço de e-mail"</string>
+    <string name="copy_number" msgid="530057841276106843">"Copiar número de telefone"</string>
+    <string name="action_label" msgid="1318401633653605424">"Enter"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Sugestões de contato ativadas"</string>
+    <string name="dropdown_delete_button_desc" msgid="8506791557733906887">"Remover <xliff:g id="CONTACT">%s</xliff:g> dos destinatários"</string>
+    <string name="chips_action_copy" msgid="1929144660075507103">"Copiar"</string>
+    <string name="chips_action_cancel" msgid="6077877438943543501">"Cancelar"</string>
+</resources>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 789a432..5478dc5 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -17,8 +17,8 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"Copiaţi adresa de e-mail"</string>
-    <string name="copy_number" msgid="530057841276106843">"Copiaţi numărul de telefon"</string>
+    <string name="copy_email" msgid="7869435992461603532">"Copiați adresa de e-mail"</string>
+    <string name="copy_number" msgid="530057841276106843">"Copiați numărul de telefon"</string>
     <string name="action_label" msgid="1318401633653605424">"Enter"</string>
     <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Sugestii de persoane de contact disponibile"</string>
     <string name="dropdown_delete_button_desc" msgid="8506791557733906887">"Eliminați <xliff:g id="CONTACT">%s</xliff:g> din destinatari"</string>
diff --git a/sample/res/values-b+sr+Latn/strings.xml b/sample/res/values-b+sr+Latn/strings.xml
new file mode 100644
index 0000000..b19cca8
--- /dev/null
+++ b/sample/res/values-b+sr+Latn/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  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.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="email_addresses" msgid="5320415175940315400">"Imejl adrese"</string>
+    <string name="phone_numbers" msgid="7836326833170390688">"Brojevi telefona"</string>
+</resources>
diff --git a/sample/res/values-pt-rBR/strings.xml b/sample/res/values-pt-rBR/strings.xml
new file mode 100644
index 0000000..5f8e346
--- /dev/null
+++ b/sample/res/values-pt-rBR/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  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.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="email_addresses" msgid="5320415175940315400">"Endereços de e-mail"</string>
+    <string name="phone_numbers" msgid="7836326833170390688">"Números de telefone"</string>
+</resources>
diff --git a/src/com/android/ex/chips/RecipientEditTextView.java b/src/com/android/ex/chips/RecipientEditTextView.java
index 5a28ebf..5b06ca1 100644
--- a/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/src/com/android/ex/chips/RecipientEditTextView.java
@@ -175,7 +175,7 @@
     private Validator mValidator;
     private Handler mHandler;
     private TextWatcher mTextWatcher;
-    private DropdownChipLayouter mDropdownChipLayouter;
+    protected DropdownChipLayouter mDropdownChipLayouter;
 
     private View mDropdownAnchor = this;
     private ListPopupWindow mAlternatesPopup;
@@ -364,7 +364,6 @@
     protected void onDetachedFromWindow() {
         super.onDetachedFromWindow();
         mAttachedToWindow = false;
-        dismissPopups();
     }
 
     @Override
@@ -755,7 +754,6 @@
             // Draw the default chip background
             mWorkPaint.reset();
             mWorkPaint.setColor(backgroundColor);
-            mWorkPaint.setAntiAlias(true);
             final float radius = height / 2;
             canvas.drawRoundRect(new RectF(0, 0, width, height), radius, radius,
                     mWorkPaint);
@@ -1774,7 +1772,7 @@
         }.execute((Void[]) null);
     }
 
-    private ListAdapter createAlternatesAdapter(DrawableRecipientChip chip) {
+    protected ListAdapter createAlternatesAdapter(DrawableRecipientChip chip) {
         return new RecipientAlternatesAdapter(getContext(), chip.getContactId(),
                 chip.getDirectoryId(), chip.getLookupKey(), chip.getDataId(),
                 getAdapter().getQueryType(), this, mDropdownChipLayouter,
@@ -2298,6 +2296,7 @@
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                 unselectChip(currentChip);
+                popup.dismiss();
             }
         });
         popup.show();
@@ -2335,7 +2334,9 @@
         }
         setCursorVisible(true);
         setSelection(editable.length());
-        dismissPopups();
+        if (mAlternatesPopup != null && mAlternatesPopup.isShowing()) {
+            mAlternatesPopup.dismiss();
+        }
     }
 
     @Override