Git Product home page Git Product logo

imagerpickermaster's Introduction

Gradle

Add it in your root build.gradle at the end of repositories:

repositories {
    maven {
        url  "https://dl.bintray.com/supertxy/maven" 
    }
}
  

Add the dependency dependencies

dependencies {
	compile 'com.supertxy.media:imagepicker:v1.6.5'
}

Features

1、可以选择图片或视频(限制时长12s),选中的图片可在底部显示,并按选择的顺序标号。 2、点击图片可查看大图(视频),视频可播放。 3、kotlin 4、自定义拍照和摄像功能 - 闪光灯和切换摄像头的实现 - 手动聚焦显示聚焦框 - 双指缩放 - 仿微信摄像按钮,限定时长12s - 拍摄完后自动循环播放 Use

主要有两个选择的界面一个普通不带视频的CommonPickerActivity,另一个是带视频操作的PickerActivity。 1、CommonPickerActivity.startForResult(this,12, medias)

	/**
         * @param context
         * @param maxSelect 一次最大可选择图片数
         * @param initialSelect  初始选中的列表(上一次选中的)
         */
        fun startForResult(context: Activity, maxSelect: Int, initialSelect: ArrayList<Media>) {
            val intent = Intent(context, PickerActivity::class.java)
            intent.putExtra(PickerSettings.MAX_SELECT, maxSelect)
            intent.putExtra(PickerSettings.INITIAL_SELECT, initialSelect)
            context.startActivityForResult(intent, PickerSettings.PICKER_REQUEST_CODE)
        }

2、PickerActivity.startForResult(this,6, medias)

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.