Git Product home page Git Product logo

mediapicker's Introduction

MediaPicker

介绍

高仿Android版微信的图片和视频选择器。

集成库

Step 1. Add the JitPack repository to your build file

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency

	dependencies {
	        compile 'com.github.xushihai:MediaPicker:v1.8'
	}

使用教程

 GalleryFinal.selectMedias(this, 10, new GalleryFinal.OnSelectMediaListener() {
            @Override
            public void onSelected(ArrayList<Photo> photoArrayList) {
                
            }
        });
    使用EventBus3.0注册,接收选择好的图片和视频列表
    @Subscribe(threadMode = ThreadMode.MAIN)
    public void sendMedia(ArrayList<Photo> photoList) {
        Log.e("多媒体", photoList.toString());
    }
    
    GalleryFinal.selectMedias(this, 10);
  GalleryFinal.captureMedia(this, Environment.getExternalStorageDirectory().getAbsolutePath(),10*1000);
    使用EventBus3.0注册,接收拍摄好的图片或视频
    @Subscribe(threadMode = ThreadMode.MAIN)
    public void sendMedia(Photo media) {
         
    }
    GalleryFinal.captureMedia(this, Environment.getExternalStorageDirectory().getAbsolutePath(), new GalleryFinal.OnCaptureListener() {
        @Override
        public void onSelected(Photo photo) {
            Log.e("拍摄","拍摄完成:"+photo);
        }
    });

使用了v7兼容包,EventBus,Glide,RecyclerView组件。如果项目中包含了这些组件可以使用exclude将这几个组件排除。

 exclude group: 'com.android.support', module: 'appcompat-v7'
 exclude group: 'com.android.support', module: 'recyclerview-v7'
 exclude group: 'org.greenrobot', module: 'eventbus'
 exclude group: 'com.github.bumptech.glide', module: 'glide'

截图

[N|Solid] [N|Solid] [N|Solid] [N|Solid] [N|Solid] [N|Solid] [N|Solid]

mediapicker's People

Contributors

xushihai avatar

Stargazers

周乐 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.