From 5979a44738a9513e42ad5afc1e64f3e3dd995bbc Mon Sep 17 00:00:00 2001 From: Rafael Chagas Date: Wed, 13 May 2020 12:09:51 +0200 Subject: [PATCH] Fix search current location Signed-off-by: Rafael Chagas --- .../java/com/rtchagas/pingplacepicker/model/SimplePlace.kt | 6 +++--- .../src/main/java/com/rtchagas/pingsample/MainActivity.kt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/src/main/java/com/rtchagas/pingplacepicker/model/SimplePlace.kt b/library/src/main/java/com/rtchagas/pingplacepicker/model/SimplePlace.kt index 35b240b..1ee8161 100644 --- a/library/src/main/java/com/rtchagas/pingplacepicker/model/SimplePlace.kt +++ b/library/src/main/java/com/rtchagas/pingplacepicker/model/SimplePlace.kt @@ -9,13 +9,13 @@ data class SimplePlace( @Json(name = "geometry") val geometry: Geometry, @Json(name = "name") - val name: String, + val name: String = "", @Json(name = "photos") val photos: List = emptyList(), @Json(name = "place_id") val placeId: String, @Json(name = "types") - val types: List, + val types: List = emptyList(), @Json(name = "vicinity") - val vicinity: String + val vicinity: String = "" ) \ No newline at end of file diff --git a/sample/src/main/java/com/rtchagas/pingsample/MainActivity.kt b/sample/src/main/java/com/rtchagas/pingsample/MainActivity.kt index d4c8c5d..e9d3efc 100644 --- a/sample/src/main/java/com/rtchagas/pingsample/MainActivity.kt +++ b/sample/src/main/java/com/rtchagas/pingsample/MainActivity.kt @@ -48,7 +48,7 @@ class MainActivity : AppCompatActivity() { val place: Place? = PingPlacePicker.getPlace(data!!) - toast("You selected: ${place?.name}") + toast("You selected: ${place?.name}\n ${place?.id}") } } }