Coder Social home page Coder Social logo

largeimageview's Introduction

Android超长图片显示组件


一、目的

实现一个LargeImageView组件,支持显示超长图片,支持触摸上下左右滑动,支持双指缩放,支持双击放大/还原。 实现图片预览Activity,支持多图预览,支持本地保存,支持图片文字说明。

二、LargeImageView组件用法

    <com.puerlink.imagepreview.LargeImageView
        android:id="@+id/image_scale_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    </com.puerlink.imagepreview.LargeImageView>
具体用法和ImageView相同。

三、图片预览Activity用法

    List<ImageItem> items = new ArrayList<ImageItem>();
    ImageItem item = new ImageItem("图片Url", "图片描述");
    items.add(item);
    
    Intent intent = new Intent(activity, ImagePreviewActivity.class);
    intent.putExtra("title", title);    //顶部标题
    intent.putExtra("show_desc", true); //是否显示图片描述
    intent.putExtra("show_dot", true);  //多张图时是否显示指示点
    intent.putExtra("images", (Serializable) items);    //图片信息
    intent.putExtrea("auto_hide", true);    //标题是否自动收起
    activity.startActivity(intent);

largeimageview's People

Contributors

softwaiter avatar

Watchers

 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.