From fbb66864e52c9801f43a315d529ee00b1f7d3161 Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Thu, 31 Jan 2019 15:22:40 -0600 Subject: [PATCH] Change the method to zoom the map camera when a suggestion is selected from the Toolbar's SearchView in MerchantsFragment, it now shows a much bigger area. --- .../bitsybitshareswallet/fragments/MerchantsFragment.kt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt index 7ec0db0..5d31ee3 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/MerchantsFragment.kt @@ -299,13 +299,8 @@ class MerchantsFragment : Fragment(), OnMapReadyCallback, SearchView.OnSuggestio cursor?.close() if (lat != null && lon != null) { - val builder = LatLngBounds.builder() - builder.include(LatLng(lat, lon)) - - val bounds = builder.build() - try { - mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 100)) + mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(LatLng(lat, lon), 15f)) } catch (e: Exception) { Log.d(TAG, e.message) }