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
//pixel | |
implementation 'io.github.mmobin789.pixel:pixel:1.0.0-alpha' | |
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
GROUP=io.github.mmobin789.pixel | |
POM_ARTIFACT_ID=pixel | |
VERSION_NAME=1.0.0-alpha | |
POM_NAME=pixel | |
POM_PACKAGING=aar | |
POM_DESCRIPTION=A lightweight image loader for Android backed by Kotlin Coroutines. | |
POM_INCEPTION_YEAR=2020 |
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
apply plugin: 'com.android.library' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'com.vanniktech.maven.publish' // NEW | |
publishing { |
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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
ext.kotlin_version = '1.4.32' | |
ext.espressoVersion = "3.3.0" | |
repositories { | |
google() | |
jcenter() | |
} |
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 | |
/** |