All Projects → corouteam → Glidetovectoryou

corouteam / Glidetovectoryou

Licence: apache-2.0
Load SVGs in Android with Glide

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Glidetovectoryou

Android Toy
不积跬步 无以至千里
Stars: ✭ 54 (-67.27%)
Mutual labels:  glide, drawable
Spedittool
An efficient and scalable library for inputing and displaying gif or @mention on graph-text mixed TextView/EditText
Stars: ✭ 292 (+76.97%)
Mutual labels:  glide, drawable
svg2vector
Online batch converter of SVG images to Android vector drawable XML resource files
Stars: ✭ 39 (-76.36%)
Mutual labels:  vector, drawable
Android Animated Icons
How to improve the user experience using animated icons with vector drawables on Android
Stars: ✭ 117 (-29.09%)
Mutual labels:  vector, drawable
Iread
Using Retrofit2,RxJava,RxKotlin,OkHttp,lottie,Material Design combined with Kotlin to display the wanAndroid's article and Douban hot movie and zhihu daily newspaper.
Stars: ✭ 158 (-4.24%)
Mutual labels:  glide
Moonshot
A SpaceX companion app for Android
Stars: ✭ 150 (-9.09%)
Mutual labels:  vector
Logos Per Banks
LogoS is a design project about logos. In clean vector and organized as libraries to use. This one includes logos of Banks and Payment Gateways of Iran
Stars: ✭ 143 (-13.33%)
Mutual labels:  vector
Plutovg
Tiny 2D vector graphics library in C
Stars: ✭ 141 (-14.55%)
Mutual labels:  vector
Elm Geometry
2D/3D geometry package for Elm
Stars: ✭ 162 (-1.82%)
Mutual labels:  vector
Draggableimageviewer
大图浏览 & 图片查看&拖拽退出。类似于微信、B站的图片 & 视频浏览器。
Stars: ✭ 153 (-7.27%)
Mutual labels:  glide
Juzimi
句子迷APP,MVP架构,Okhttp + Retrofit + RxJava,图片加载Glide,数据库Object-box
Stars: ✭ 156 (-5.45%)
Mutual labels:  glide
Ximalayakotlin
🔥 一个模仿企鹅 FM 界面的 Android 应用—喜马拉雅Kotlin。完全使用 Kotlin 开发。有声资源和播放器由喜马拉雅 SDK 提供。An unofficial Ximalaya FM client for Android entirely written using Kotlin language.
Stars: ✭ 151 (-8.48%)
Mutual labels:  glide
Vald
Vald. A Highly Scalable Distributed Vector Search Engine
Stars: ✭ 158 (-4.24%)
Mutual labels:  vector
Node Sylvester
🐱 Sylvester is a vector, matrix, and geometry library for JavaScript, that runs in the browser and on the server.
Stars: ✭ 144 (-12.73%)
Mutual labels:  vector
Glide
https://github.com/Masterminds/glide
Stars: ✭ 160 (-3.03%)
Mutual labels:  glide
Glideimageview
基于Glide V4.9.0封装的图片加载库,可以监听加载图片时的进度
Stars: ✭ 1,741 (+955.15%)
Mutual labels:  glide
Hlslpp
Math library using hlsl syntax with SSE/NEON support
Stars: ✭ 153 (-7.27%)
Mutual labels:  vector
Mvvmarchitecture
MVVM 框架,采用 Kotlin+Jetpack,可自由配置功能,欢迎 star,fork,issue
Stars: ✭ 159 (-3.64%)
Mutual labels:  glide
Coolweather
Weather App that uses Android best practices. Android Jetpack, clean architecture. Written in Kotlin
Stars: ✭ 154 (-6.67%)
Mutual labels:  glide
Aegis Icons
Unofficial 2FA entry icons for open source Android authenticator Aegis
Stars: ✭ 153 (-7.27%)
Mutual labels:  vector

GlideToVectorYou

Load SVGs with Glide

Introduction

GlideToVectorYou enables you to easily load your remote vector images (only .svg are supported for now) like other image formats.

The library is based on Glide and offers the same functionalities + svg support.

Changelog available here.

How to use

Add JitPack in your root build.gradle at the end of repositories:

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

Add the dependency in your app build.gradle:

	dependencies {
           implementation 'com.github.corouteam:GlideToVectorYou:v2.0.0'
   }

There are 3 ways to use this library.

Lazy way

You just have to use a method:

	GlideToVectorYou.justLoadImage(activity, IMAGE_URI, targetImageView)

The svg will be automatically downloaded and inserted in your target Image View.

Easy eh?

Normal way

        GlideToVectorYou
                .init()
                .with(this)
                .withListener(new GlideToVectorYouListener() {
                    @Override
                    public void onLoadFailed() {
                        Toast.makeText(context, "Load failed", Toast.LENGTH_SHORT).show()
                    }

                    @Override
                    public void onResourceReady() {
                        Toast.makeText(context, "Image ready", Toast.LENGTH_SHORT).show()
                    }
                })
                .setPlaceHolder(placeholderLoading, placeholderError)
                .load(IMAGE_URL, imageview); 

Here you have more methods to customize the behaviour of GlideToVectorYou. You can for example:

  • set a custom listener to respond to events with withListener()
  • show place holders while the image is loading or the loading failed with setPlaceHolder().

Advanced way

If you are a Glide pro, you can ask GlideToVectorYou to give you access to the original Glide's RequestBuilder.

        RequestBuilder<PictureDrawable> requestBuilder = GlideToVectorYou
                .init()
                .with(this)
                .getRequestBuilder();

Here you can use the variable requestBuilder like a normal Glide request. The only difference is that it will still continue to work with SVGs :)

Again, for example, you could apply a custom transition or crop the image:

        requestBuilder
                .load(IMAGE_URI)
                .transition(DrawableTransitionOptions.withCrossFade())
                .apply(new RequestOptions()
                        .centerCrop())
                .into(imageView);

Set SVG as background

If you need to load a .svg image as backgroud of a generic view, just call:

	GlideToVectorYou.justLoadImageAsBackground(activity, IMAGE_URI, view)

Licence

This library is shared under Apache License 2.0.

Made with ♥ by Corouteam

We're Glid.. ehm... Glad to help you :D

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].