Android 图片选择器 MutiPhotoChoser

码农软件 · 软件分类 · 手机开发包 · 2019-05-05 14:59:53

软件介绍

MutiPhotoChoser 是一款支持多选的图片选择器,支持 Android2.0+。

Screenshot

使用(详见app目录)

配置AndroidManifest.xml

1、添加权限:

 <!--SD卡读写权限-->
 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
 <uses-permission android:name="ANDROID.PERMISSION.WRITE_EXTERNAL_STORAGE" />

2、声明GalleryActivity:

<activity android:name="com.ns.mutiphotochoser.GalleryActivity">
    <intent-filter>
        <!--***改成应用的包名-->
        <action android:name="***.action.CHOSE_PHOTOS" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter></activity>

调起图片选择页面选择图片

/*改成应用的包名*/
Intent intent = new Intent("***.action.CHOSE_PHOTOS");
startActivityForResult(intent, REQUEST_PICK_PHOTO);

处理选择结果

@Overridepublic void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (resultCode != Activity.RESULT_OK) {
        return;
    }

    switch (requestCode) {
        case REQUEST_PICK_PHOTO:
            ArrayList<String> images = data.getStringArrayListExtra(Constant.EXTRA_PHOTO_PATHS);
            mAdaper.swapDatas(images);
            break;
    }}

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

Head First Rails

Head First Rails

David Griffiths / O'Reilly Media / 2008-12-30 / USD 49.99

Figure its about time that you hop on the Ruby on Rails bandwagon? You've heard that it'll increase your productivity exponentially, and allow you to created full fledged web applications with minimal......一起来看看 《Head First Rails》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具