GithubHelp home page GithubHelp logo

irmobydick / redirectglide Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aminography/redirectglide

0.0 1.0 0.0 335 KB

RedirectGlide empowers Glide to load images with indirect URLs.

Java 99.73% Shell 0.27%

redirectglide's Introduction

RedirectGlide ⚡

Android Arsenal API Download

RedirectGlide empowers Glide to load images with indirect URLs.

Sometimes the images you want to show with Glide have indirect link and you should redirect the URL to reach the real direct link. RedirectGlide is an extension over Glide's OkHttp3 Integration which adds the redirection functionality to Glide.

• Currently it's implemented only for Glide-v4.

Download

Add the following lines to your build.gradle file:

repositories {
    jcenter()
}
  
dependencies {
    implementation 'com.aminography:redirectglide:1.0.2'
    
    // The normal Glide dependencies
    implementation 'com.github.bumptech.glide:glide:4.8.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
}

How to use RedirectGlide?

You can simply use RedirectGlide by Glide's generated API. Note that you should clean and rebuild your project to create the GlideApp class in compile time.

String imageUrl = "https://bit.ly/2zeMrFB";

GlideApp.with(context)
        .load(imageUrl)
        .into(imageView);

Example

• Customize the maximum redirection count

The default value for maximum redirection count is set to 5. However you can change it by wrapping the image URL with an instance of RedirectGlideUrl.

GlideApp.with(context)
        .load(new RedirectGlideUrl(imageUrl, 10))
        .into(imageView);

redirectglide's People

Contributors

aminography avatar

Watchers

MAY3AM avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.