Giter Club home page Giter Club logo

longimageview's Introduction

项目介绍

因为项目需要加载超出屏幕的图片,类似新浪微薄长图,所以结合Github上的[Subsampling Scale Image View](https://github.com/davemorrissey/subsampling-scale-image-view)
和Fresco图片加载框架一起实现该效果。后续会添加Glide等。

#使用说明 方式一: 直接使用 compile 'com.marks.longview:longimage:1.0.0' 引入依赖库 方式二: 拷贝longimage中的文件到你自定义路径下,然后自定义Application,设置Fresco的初始化,在xml中使用 SubsamplingScaleImageView,在Activity中获取该控件,调用setImageUri方法传入uri地址即可。 自定义Application xml中使用 activity中设置地址

#注意事项 该项目中使用了Fresco等图片加载框架,所以如果需要混淆,请自行填加。

#更新日志 ######1.0.2 项目添加Glide加载方式: public void setImageUriByGlide(String url){ setMaxScale(10.0F); setMinScale(1.0F); setMinimumScaleType(getImageType()); Glide.with(this.getContext()).load(url).downloadOnly(new SimpleTarget() { @Override public void onResourceReady(File resource, GlideAnimation<? super File> glideAnimation) { setImage(ImageSource.uri(Uri.fromFile(resource)),new ImageViewState(1.0F,new PointF(0,0),0)); } }); }

######1.0.1 Subsampling Scale Image View 和Fresco 实现长图的加载

#联系方式 Email:[email protected]

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.