Skip to content

ninh-huynh/faster

Repository files navigation

Feature

  • Easy to use
  • Support various input: UrlString, File, Resource, Uri
  • Support local & network DataSource
  • Resizing image
  • Basic scale transformation: Center Crop, Fit Center
  • Caching image for faster reuse

Install

Add these line in your build.gradle at the end of repository

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }  
}

Add the dependency

dependencies{
  implementation 'com.github.kim-ninh:faster:v1.0'
}

v1.0

Usage

Common use

This will create request with scale type is match the imageView's scale type. Placeholder loading is disable by default. And the size of target image with automatic get from ImageView's width, height

void onCreate(){

    // ...

    Faster.with(context)
        .load(urlString)
        .into(imageView);
}

or with some tweak

void onCreate(){
    // ...

    Faster.with(context)
        .load(urlString)
        .placeholder(new ColorDrawable(Color.TRANSPARENT))
        .transfrom(ScaleType.FIT_CENTER)
        .into(imageView)    
    
}

RecyclerView, ListView

public void onBindViewHolder(ViewHolder vh, int position){

    Faster.with(PhotoGalleryFragment.this.getActivity())
            .load(itemURL)
            .placeholder(new ColorDrawable(Color.TRANSPARENT))
            .into(holder.mItemImageView);
}

About

A simple android image loading lib

Resources

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages