summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaikai Wang <kaikai@google.com>2014-09-19 16:31:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-19 16:31:37 +0000
commitfe686ee34d9d881a13a5f958583abeb66ba4c47c (patch)
treeb106a4714ec505a3ec3e6b1db1faade7cc747053
parent15a5ebc25941143d5fb65498ebc835d79351d3ad (diff)
parenta5461b72d228191efda5ef084455f3066d5648ae (diff)
downloadandroid_frameworks_opt_chips-fe686ee34d9d881a13a5f958583abeb66ba4c47c.tar.gz
android_frameworks_opt_chips-fe686ee34d9d881a13a5f958583abeb66ba4c47c.tar.bz2
android_frameworks_opt_chips-fe686ee34d9d881a13a5f958583abeb66ba4c47c.zip
Merge "Bug: 17517371: Stop using custom action label in chips" into ub-chips-cranbrook
-rw-r--r--Android.mk2
-rw-r--r--src/com/android/ex/chips/RecipientEditTextView.java6
2 files changed, 6 insertions, 2 deletions
diff --git a/Android.mk b/Android.mk
index dd86146..5c3df78 100644
--- a/Android.mk
+++ b/Android.mk
@@ -17,7 +17,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libchips
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
-LOCAL_SDK_VERSION := 19
+LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := \
$(call all-java-files-under, src) \
$(call all-logtags-files-under, src)
diff --git a/src/com/android/ex/chips/RecipientEditTextView.java b/src/com/android/ex/chips/RecipientEditTextView.java
index e6f4c35..ac06a42 100644
--- a/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/src/com/android/ex/chips/RecipientEditTextView.java
@@ -367,7 +367,11 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements
}
outAttrs.actionId = EditorInfo.IME_ACTION_DONE;
- outAttrs.actionLabel = getContext().getString(R.string.action_label);
+
+ // Custom action labels are discouraged in L; a checkmark icon is shown in place of the
+ // custom text in this case.
+ outAttrs.actionLabel = Build.VERSION.SDK_INT >= Build.VERSION_CODES.L ? null :
+ getContext().getString(R.string.action_label);
return connection;
}