All Projects → s0nerik → glide-bindingadapter

s0nerik / glide-bindingadapter

Licence: other
Configurable @BindingAdapter for Glide

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to glide-bindingadapter

BakingApp
🍛🍴 This app allows a user to select a recipe and see video-guided steps for how to complete it, showcasing MVVM, Retrofit, ExoPlayer with lifecycle components, Master/Detail Flow, Widgets.
Stars: ✭ 18 (+12.5%)
Mutual labels:  glide, databinding
Wanandroid
🏄 基于Architecture Components dependencies (Lifecycles,LiveData,ViewModel,Room)构建的WanAndroid开源项目。 你值得拥有的MVVM快速开发框架:https://github.com/jenly1314/MVVMFrame
Stars: ✭ 410 (+2462.5%)
Mutual labels:  glide, databinding
Kotlin Modular Tdd Coroutines Mvvm
A sample Kotlin app which was built with modular structure, Kotlin DSL, Kotlin Coroutines, TDD and MVVM patterns.
Stars: ✭ 256 (+1500%)
Mutual labels:  glide, databinding
NYTimesMostPopularArticles
A simple app to hit the NY Times Most Popular Articles API and show a list of articles, that shows details when items on the list are tapped (a typical master/detail app), also user able to browse/ add articles to favorite list that implements MVVM architecture using Dagger2, Retrofit, Coroutines, LiveData, RoomDatabase, Database Debugging, Data…
Stars: ✭ 38 (+137.5%)
Mutual labels:  glide, databinding
EasyTask MVVM Kotlin
Todo app based on MVVM, Kotlin Coroutines, Navigation Component, Room Database, Retrofit, Data Binding
Stars: ✭ 49 (+206.25%)
Mutual labels:  glide, databinding
MVVM-Demo
This demo for MVVM Design pattern for android
Stars: ✭ 20 (+25%)
Mutual labels:  glide, databinding
Mvvmsmart
基于谷歌最新AAC架构,MVVM设计模式的一套快速开发库,整合ViewModel+Lifecycles+Navigation+DataBinding+LiveData+Okhttp+Retrofit+RxJava+Glide等主流模块,满足日常开发需求。使用该框架可以快速开发高质量、易维护的Android应用。 项目组会持续维护,请放心使用.欢迎Start并Fork交流.
Stars: ✭ 382 (+2287.5%)
Mutual labels:  glide, databinding
catchflicks
🎬 Kitchen sink project for learning android concepts 🎬
Stars: ✭ 12 (-25%)
Mutual labels:  glide, databinding
Mvvmarchitecture
MVVM 框架,采用 Kotlin+Jetpack,可自由配置功能,欢迎 star,fork,issue
Stars: ✭ 159 (+893.75%)
Mutual labels:  glide, databinding
Coolweather
Weather App that uses Android best practices. Android Jetpack, clean architecture. Written in Kotlin
Stars: ✭ 154 (+862.5%)
Mutual labels:  glide, databinding
PlayAndroid
✌️✊👋玩安卓Mvvm组件化客户端,整合Jetpack组件DataBinding、ViewModel以及LiveData;屏幕适配✔️状态栏沉浸式✔️黑夜模式✔️,无数据、加载失败状态页;骨架屏、Koin依赖注入等
Stars: ✭ 193 (+1106.25%)
Mutual labels:  glide, databinding
FlickOff
A lite movie guide app, with MVVM architecture, that lets you discover movies from TMDb.
Stars: ✭ 31 (+93.75%)
Mutual labels:  glide, databinding
Jetpack github
基于Kotlin + Jetpack全家桶 + Coroutines(协程) + Flutter等架构实现的一款精简版Github客户端项目,望与广大小伙伴一起成长,欢迎start or fork!
Stars: ✭ 314 (+1862.5%)
Mutual labels:  glide, databinding
Mvvmhabit
goldze: 本人喜欢尝试新的技术,以后发现有好用的东西,我将会在企业项目中实战,没有问题了就会把它引入到MVVMHabit中,一直维护着这套框架,谢谢各位朋友的支持。如果觉得这套框架不错的话,麻烦点个 star,你的支持则是我前进的动力!
Stars: ✭ 6,789 (+42331.25%)
Mutual labels:  glide, databinding
roove
Dating app based on firebase services and facebook login. MVVM-Kotlin-RxJava-Dagger-Databinding
Stars: ✭ 55 (+243.75%)
Mutual labels:  glide, databinding
WanAndroidJetpack
🔥 WanAndroid 客户端,Kotlin + MVVM + Jetpack + Retrofit + Glide。基于 MVVM 架构,用 Jetpack 实现,网络采用 Kotlin 的协程和 Retrofit 配合使用!精美的 UI,便捷突出的功能实现,欢迎下载体验!
Stars: ✭ 124 (+675%)
Mutual labels:  glide, databinding
Jetpack Kotlin Eyepetizer
一款基于Kotlin + Jetpack核心组件 + 协程 + 组件化实现的精美仿开眼视频App(提供Flutter、React Native、小程序版本 😁 )
Stars: ✭ 82 (+412.5%)
Mutual labels:  databinding
WanAndroidMaster
根据 http://www.wanandroid.com 提供api ,编写 包含 Material Design + MVP + Rxjava2 + Retrofit + Glide项目
Stars: ✭ 74 (+362.5%)
Mutual labels:  glide
udacity-baking-recipes
Udacity - Baking Android App
Stars: ✭ 14 (-12.5%)
Mutual labels:  glide
BESTV
Android TV App powered by TMDb. It is a easy way to find the best TV content, the top movies, series... all of that in your TV.
Stars: ✭ 49 (+206.25%)
Mutual labels:  glide

glide-bindingadapter

Android Arsenal

@BindingAdapter for loading images with Glide without writing a single line of code using Data Binding Library.

Usage

Register configuration providers like this:

public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        registerGlideConfigs();
    };

    private void registerGlideConfigs() {
        GlideBindingConfig.registerProvider("config1", (iv, request) ->
            request.centerCrop()
                   .placeholder(R.color.md_black_1000)
                   .error(R.drawable.no_image)
        );
        GlideBindingConfig.registerProvider("config2", (iv, request) ->
            request.centerCrop()
                   .placeholder(iv.getDrawable())
                   .error(R.drawable.error)
        );
        GlideBindingConfig.setDefault("config1");
    }
}

You can use any type as a config key (I'd recommend you to use enums if you want some more safety).

Then, in your layout:

<?xml version="1.0" encoding="utf-8"?>
<layout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    >
    <data>
        <variable name="song" type="project.models.Song" />
    </data>
    <ImageView
        android:id="@+id/background"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:glideImageSrc='@{song.albumArtUri}'
        app:glideConfig='@{"config2"}'
        />
</layout>

app:glideImageSrc can be either a String or Uri.

app:glideConfig specifies a configuration that will be used to load the image. If not specified, the default configuration will be used.

Installation

  • Add this to your project level build.gradle:
allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}
  • Add this to your app's build.gradle:
compile 'com.github.s0nerik:glide-bindingadapter:{latest version}'

License

Copyright 2016 Alex Isaienko (s0nerik)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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].