Skip to content

Commit

Permalink
[ISSUE #231] Address returned fix (#232)
Browse files Browse the repository at this point in the history
* Correct artifact generation

* [ISSUE #231] When returning coordinates it should return empty address instead of the previous one
  • Loading branch information
ferranpons authored Mar 13, 2019
1 parent 2fe8659 commit e323d1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ class LocationPickerActivity : AppCompatActivity(),

override fun willGetLocationInfo(latLng: LatLng) {
changeLocationInfoLayoutVisibility(View.VISIBLE)
resetLocationAddress()
setCoordinatesInfo(latLng)
}

Expand Down Expand Up @@ -831,6 +832,12 @@ class LocationPickerActivity : AppCompatActivity(),
showCoordinatesLayout()
}

private fun resetLocationAddress() {
street?.text = ""
city?.text = ""
zipCode?.text = ""
}

private fun setLocationInfo(address: Address) {
street!!.text = address.getAddressLine(0)
city!!.text = if (isStreetEqualsCity(address)) "" else address.locality
Expand Down

0 comments on commit e323d1a

Please sign in to comment.