Skip to content

cesarferreira/faker

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Faker

A kotlin extension to load images asynchronously on android

Platform API License: MIT License: MIT

Features

  • Load random images asynchronously into any ImageView
  • Load a random image that fits perfectly the size of that imageView
  • Load any image by passing a simple url into it
  • Perfect for image placeholders to jump start a project

Install

Just add the following dependency in your app's build.gradle

allprojects { repositories { maven { url 'https://jitpack.io' } }}
dependencies {
      implementation 'com.github.cesarferreira:faker:x.x.x'
}

or use drone:

drone add faker app-module

Examples

Here are some examples to provide you a head start with using this library.

.loadRandomImage()

imageView.loadRandomImage()

.loadFromUrl(url: String)

imageView.loadFromUrl("http://sample.com/image.png")

.loadFromUrl(url: String, placeholder: Int, error: Int)

imageView.loadFromUrl("http://sample.com/image.png", R.color.placeholder, R.color.error)

.loadFromUrl(url: String, placeholder: Drawable, error: Drawable)

imageView.loadFromUrl("http://sample.com/image.png", R.drawable.placeholder, R.drawable.error)

License

Licensed under MIT license. View license.

About

A kotlin extension to load images asynchronously on android

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published