This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mustufamedium.geocoderexample | |
import android.content.Context | |
import androidx.lifecycle.LiveData | |
import androidx.lifecycle.MutableLiveData | |
import androidx.lifecycle.ViewModel | |
import java.lang.Exception | |
/** | |
* Created by Mustufa Ansari on 17/01/2021. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mustufamedium.geocoderexample | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.lifecycle.Observer | |
import androidx.lifecycle.ViewModelProvider | |
import com.google.android.gms.maps.CameraUpdateFactory | |
import com.google.android.gms.maps.GoogleMap | |
import com.google.android.gms.maps.MapsInitializer | |
import com.google.android.gms.maps.OnMapReadyCallback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onCameraIdle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mustufamedium.geocoderexample | |
import android.content.Context | |
import android.location.Address | |
import android.location.Geocoder | |
import com.google.android.gms.common.util.CollectionUtils | |
import org.apache.commons.lang3.StringUtils | |
import java.util.* | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<com.google.android.gms.maps.MapView | |
android:id="@+id/mapView" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.codixlab.retrofitandplaceautocompleteapi.ui | |
import android.app.Activity | |
import android.content.Intent | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.databinding.DataBindingUtil | |
import androidx.lifecycle.Observer | |
import com.codixlab.retrofitandplaceautocompleteapi.R | |
import com.codixlab.retrofitandplaceautocompleteapi.databinding.ActivityMainBinding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.codixlab.retrofitandplaceautocompleteapi.ui | |
import android.app.Activity | |
import android.content.Intent | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.text.Editable | |
import android.text.TextWatcher | |
import android.view.View | |
import androidx.lifecycle.Observer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.codixlab.retrofitandplaceautocompleteapi.viewmodel | |
import androidx.lifecycle.LiveData | |
import androidx.lifecycle.MutableLiveData | |
import androidx.lifecycle.ViewModel | |
import androidx.lifecycle.viewModelScope | |
import com.codixlab.retrofitandplaceautocompleteapi.models.PlaceAutoCompleteResponse | |
import com.codixlab.retrofitandplaceautocompleteapi.models.PlaceDetailsResponse | |
import com.codixlab.retrofitandplaceautocompleteapi.utils.InjectUtils | |
import com.codixlab.retrofitandplaceautocompleteapi.utils.ResponseStatusCallbacks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.codixlab.retrofitandplaceautocompleteapi.models | |
import com.google.gson.annotations.Expose | |
import com.google.gson.annotations.SerializedName | |
class PlaceDetailsResponse { | |
@SerializedName("html_attributions") | |
@Expose | |
val htmlAttributions: List<Any>? = null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.codixlab.retrofitandplaceautocompleteapi.models | |
import com.google.gson.annotations.Expose | |
import com.google.gson.annotations.SerializedName | |
class PlaceAutoCompleteResponse { | |
@SerializedName("predictions") | |
@Expose | |
val predictions: List<Prediction>? = null |
NewerOlder