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
override fun onMapReady(p0: GoogleMap?) { | |
this.googleMap = p0 | |
val source = LatLng(31.490127, 74.316971) //starting point (LatLng) | |
val destination = LatLng(31.474316, 74.316112) // ending point (LatLng) | |
googleMap?.run { | |
moveCameraOnMap(latLng = source) |
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
// Loads an image without a placeholder. | |
Pixel.load("https://example.com/image.jpg", iv) | |
// Loads an image with a placeholder resource. | |
Pixel.load("https://example.com/image.jpg", iv3, PixelOptions.Builder().setPlaceholderResource(R.drawable.ic_loading_android).build()) | |
// Loads an image of 30x30 pixels with a placeholder resource. | |
Pixel.load("https://example.com/image.jpg", holder.iv, PixelOptions.Builder().setPlaceholderResource(R.drawable.ic_loading_android) | |
.setImageSize(30, 30).build()) |
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
import android.annotation.TargetApi | |
import android.content.Context | |
import android.net.ConnectivityManager | |
import android.net.Network | |
import android.net.NetworkRequest | |
import android.os.Build | |
/** |