Giter Club home page Giter Club logo

imageloadingview's Introduction

ImageLoadingView

Abstract 摘要

类似微信和微博图片或视频加载时的轻量级loading

Gif 动画

1 2

Demo 下载体验

Download Demo

Usage 使用方法

Step 1

Gradle 配置

dependencies {
    compile 'com.yinglan.imageloadingview:library:0.1.0'
}

Step 2

In layout

	    <com.yinglan.imageloadingview.ImageLoadingView
                android:id="@+id/loadingview"
                android:layout_centerInParent="true"
                android:layout_width="50dp"
                android:layout_height="50dp" />

or

In Java Code

	{
	   ImageLoadingView loadingView = new ImageLoadingView(this);
       loadingView.setTargetView(imageView);
    }

Step 3

提供方法:
	loadingView.setProgress(float f); //0.0 ~ 1.0;
	loadingView.loadCompleted();
	loadingView.loadCompleted(ImageLoadingView.ViewType.IMAGE);
	loadingView.loadCompleted(ImageLoadingView.ViewType.VIDEO);
        loadingView.loadFaild();
        loadingView.setInsideCircleColor(int color);
        loadingView.setOutsideCircleColor(int color);

FAQ 注意

	在为动态生成的控件添加ImageLoadingView时,需要注意先为该控件添加可靠父布局,再调用setTargetView(imageView).
	本demo中是使用imageloader来实现的图片加载进度监听回调

LICENSE 开源协议

   Apache License Version 2.0

imageloadingview's People

Contributors

yinglannull avatar

Watchers

James Cloos 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.