diff --git a/build.gradle b/build.gradle index ae32a439..84aa326c 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:1.5.0' + classpath 'com.android.tools.build:gradle:2.1.3' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4d0b44e0..f6c9549a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Dec 17 18:27:18 CET 2014 +#Fri Sep 16 11:36:56 EDT 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/library/src/main/java/com/tokenautocomplete/TokenCompleteTextView.java b/library/src/main/java/com/tokenautocomplete/TokenCompleteTextView.java index 63ab9821..f64facea 100644 --- a/library/src/main/java/com/tokenautocomplete/TokenCompleteTextView.java +++ b/library/src/main/java/com/tokenautocomplete/TokenCompleteTextView.java @@ -823,6 +823,9 @@ public void onFocusChanged(boolean hasFocus, int direction, Rect previous) { // See if the user left any unfinished tokens and finish them if (!hasFocus) performCompletion(); + // Clear sections when focus changes to avoid a token remaining selected + clearSelections(); + // Collapse the view to a single line if (allowCollapse) performCollapse(hasFocus); }