I have a google map class
class MapActivity : FragmentActivity(), OnMapReadyCallback, LocationListener, GoogleApiClient.ConnectionCallbacks,
GoogleApiClient.OnConnectionFailedListener {
However i only use a few of the required functions provided by the implementations. All the unused methods i just place at the bottom of the class, like this:
override fun onConnected(p0: Bundle?) {
checkLocationPermission()
val mLocationProvider = FusedLocationProviderClient(this)
mLocationProvider.lastLocation.addOnCompleteListener { task ->
goToLocation(task.result.latitude, task.result.longitude)
}
}
override fun onStatusChanged(provider: String?, status: Int, extras: Bundle?) {
//To change body of created functions use File | Settings | File Templates.
}
override fun onProviderEnabled(provider: String?) {
//To change body of created functions use File | Settings | File Templates.
}
override fun onProviderDisabled(provider: String?) {
//To change body of created functions use File | Settings | File Templates.
}
override fun onConnectionSuspended(p0: Int) {
//To change body of created functions use File | Settings | File Templates.
}
override fun onConnectionFailed(p0: ConnectionResult) {
//To change body of created functions use File | Settings | File Templates.
}
Is there a better way to dismiss of these unwanted required functions?