From 8611bb8c067c7869a2344ecfe41c226ef77ccee4 Mon Sep 17 00:00:00 2001 From: Ferran Pons Date: Wed, 16 Aug 2017 15:14:56 +0200 Subject: [PATCH 1/2] Now closes keyboard after click on item in the list of search results and solved issue #98 --- .gitignore | 1 + .../java/com/schibstedspain/leku/LocationPickerActivity.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ac455f5f..79655bc9 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ build/ local.properties gradle.properties project.properties +app/src/debug/ .idea/.name .idea/*.xml diff --git a/leku/src/main/java/com/schibstedspain/leku/LocationPickerActivity.java b/leku/src/main/java/com/schibstedspain/leku/LocationPickerActivity.java index b26f4f6c..ae8ff076 100644 --- a/leku/src/main/java/com/schibstedspain/leku/LocationPickerActivity.java +++ b/leku/src/main/java/com/schibstedspain/leku/LocationPickerActivity.java @@ -190,6 +190,7 @@ private void setUpResultsList() { listResult.setOnItemClickListener((adapterView, view, i, l) -> { setNewLocation(locationList.get(i)); changeListResultVisibility(View.GONE); + closeKeyboard(); }); } @@ -533,7 +534,7 @@ public void didLoadLocation() { changeListResultVisibility(locationList.size() > 1 ? View.VISIBLE : View.GONE); - if (locationList.size() == 1 && locationList.get(0).getMaxAddressLineIndex() > 0) { + if (locationList.size() == 1 && locationList.get(0).getMaxAddressLineIndex() >= 0) { changeLocationInfoLayoutVisibility(View.VISIBLE); } else { changeLocationInfoLayoutVisibility(View.GONE); From f489f63a593c5b12646c1c746bd6b06a58d93d92 Mon Sep 17 00:00:00 2001 From: Ferran Pons Date: Wed, 16 Aug 2017 15:20:16 +0200 Subject: [PATCH 2/2] New version 3.4.2 --- README.md | 2 +- leku/build.gradle | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8838584c..476956b9 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Include the dependency in your app `build.gradle`: ```groovy dependencies { - compile 'com.schibstedspain.android:leku:3.4.1' + compile 'com.schibstedspain.android:leku:3.4.2' } ``` diff --git a/leku/build.gradle b/leku/build.gradle index 47eba6c7..5654b8c8 100644 --- a/leku/build.gradle +++ b/leku/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'com.novoda.bintray-release' apply from: '../quality.gradle' group = 'com.schibstedspain.android' -version = '3.4.1' +version = '3.4.2' android { compileSdkVersion 25 @@ -69,7 +69,7 @@ publish { userOrg = 'schibstedspain' groupId = 'com.schibstedspain.android' artifactId = 'leku' - publishVersion = '3.4.1' + publishVersion = '3.4.2' desc = 'Location picker component for Android. It returns a latitude,longitude and an address based on the location picked in the LocationPickerActivity provided.' website = 'https://github.com/SchibstedSpain/leku' }