安卓图片浏览器 ImageViewer

码农软件 · 软件分类 · Android UI 组件 · 2019-04-23 12:29:31

软件介绍

ImageViewer 是一个适用于安卓的图片浏览器,支持关联 viewpage 的仿微信图片的图片浏览器。

运行效果

使用

Step 1. 实现IImageLoader设置图片加载器,也可以使用实现类SimpleImageLoader()

    ImageViewerConfig.imageLoader = object : SimpleImageLoader() {
            override fun getImage(context: Context, imageView: ImageView, Url: String) {
                Picasso.with(this@TabActivity).load(Url).into(imageView)
            }
        }

    ImageViewerConfig.INSTANCE.setImageLoader(new SimpleImageLoader() {
            @Override
            public void getImage(Context context, ImageView imageView, String Url) {
                Picasso.with(TabActivity.this).load(Url).into(imageView);
            }
        });

Step 2. 使用

    /**
     * 打开图片浏览单张
     *
     * @param context    Context
     * @param imageView  ImageView
     * @param object     传入格式支持:String:图片的url;(@DrawableRes) int:资源id;Bitmap;File
     */
    imageViewer.open(context, imageView, object);
    
    /**
     * 打开图片浏览多张
     *
     * @param context    Context
     * @param imageViews List<ImageView>
     * @param objects    List<Object> 传入格式支持:String:图片的url;(@DrawableRes) int:资源id;Bitmap;File
     * @param clickItem  点击的图片
     */
    imageViewer.open(context, imageViews, objects, clickItem);

更多方法详见Demo

混淆配置

-keep class uk.co.senab.photoview.** { *; }
-dontwarn uk.co.senab.photoview.**

用到的第三方lib

  • compile 'com.github.chrisbanes:PhotoView:1.3.0'

  • compile 'me.relex:circleindicator:1.2.1@aar'

本文地址:https://www.codercto.com/soft/d/4206.html

Letting Go of the Words

Letting Go of the Words

Janice (Ginny) Redish / Morgan Kaufmann / 2007-06-11 / USD 49.95

"Redish has done her homework and created a thorough overview of the issues in writing for the Web. Ironically, I must recommend that you read her every word so that you can find out why your customer......一起来看看 《Letting Go of the Words》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

html转js在线工具
html转js在线工具

html转js在线工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具