Skip to content

Instantly share code, notes, and snippets.

View Mustufa786's full-sized avatar
🎯
Focusing

Mustufa Ansari Mustufa786

🎯
Focusing
View GitHub Profile
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.
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
onCameraIdle
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.*
/**
<?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"
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
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
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
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
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