Giter Club home page Giter Club logo

android-photo-selector's Introduction

Android-Photo-Selector

This is a photo selector like WeChat's photo selector. You can modify this in order to make it be more suitable for your own repository. This lib depends on picasso. I hope you like it because this repository can you develop easily.
这个是一个像微信的图片选择器的一个图片选择器。你可以修改这个Repository,然后修改成你想要的样式。这个工程依赖Picasso,并采取Toolbar的方式。希望你能喜欢,让你的开发更方便。

Before you use it, make sure that you have declared activity and permission in AndroidManifest.xml.
在使用之前,请确保你正确依赖此工程,并在AndroidManifest.xml声明activity和premission.

<activity android:name="com.orange1988.photoselector.ui.PhotoSelectorActivity"
          android:label="@string/title_photo_selector_activity"
          android:theme="@style/AppTheme.NoActionBar"/>
<activity android:name="com.orange1988.photoselector.ui.PhotoPreviewActivity"
        android:theme="@style/AppTheme.NoActionBar"/>
          
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-feature android:name="android.hardware.camera" />

Start the activity, and you can get photo list depending on resultCode in the method "onActivityResult", then you can display them in your app.
启动Activity,并在onActivityResult中更具resultCode的结果得到你想要的相册列表,你可以在此展示你选中的列表。

startActivityForResult(new Intent(MainActivity.this, PhotoSelectorActivity.class), 0);

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    adapter.setItems(PhotoSelectedManager.getInstance().getPhotos());
    adapter.notifyDataSetChanged();
}

You can select photos and preview them
你可以选择图片并预览他们

You can choose other folders and in the preview page you can check it or uncheck it
你可以选择不同的图片,并在预览页面里选中或者取消

You can preview all photos in the current folders.
你可以预览当前相册的所有照片

You can take a photo
你可以照相,选中之后完成,再次进入是有记录的

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.