相册

作者: MrY_124d | 来源:发表于2017-06-06 13:51 被阅读0次

godlibrary-gallery

https://github.com/abook23/godlibrary-gallery


#简介

1.相册选取图片,图片按照选择顺序排序

2.图片预览

3.点击拍照,长按录像

###Image

#使用方法

##Stop1

compile 'com.abook23:godlibrary-gallery:1.2.0'

##Stop2

PhotoActivity.startActivityForResult(Activity ac, int checkMax, ArrayList checkPath, int resultCode);

CameraVideoActivity.startForResult(Activity activity, int requestCode);

CameraVideoActivity.startForResult(Activity activity, int checkMax, int requestCode);

##示例

//PhotoActivity.CHECK_BUTTON_COLOR = R.color.;//选择按钮颜色

//PhotoActivity.COLOR_BACK_BUTTON = R.color.;// 顶部背景颜色

PhotoActivity.startActivityForResult(this, 9, null, 0)

@Override

protected void onActivityResult(int requestCode, int resultCode, Intent data) {

super.onActivityResult(requestCode, resultCode, data);

if (resultCode == RESULT_OK) {

if (requestCode == 0) {

ArrayList list = data.getStringArrayListExtra(PhotoActivity.DATA);

if (list.size() == 0) {

return;

}

StringBuffer sb = new StringBuffer();

for (String s : list) {

sb.append("\n").append(s);

}

L.d(sb.toString());

}

}

}

#图片墙

ImageInfoActivity.start(Context context, int position, ArrayList urls)

自义相机

CameraVideoFragment videoFragment = CameraVideoFragment.newInstance();

//没特殊要求,sd 就可以了,HD 的视频有点大,微信就相当于SD模式

videoFragment.setDefinition(CameraVideoFragment.Definition.SD);

videoFragment.setVideoMaxDuration(60 * 1000);//最大录入时间,默认10s

videoFragment.setVideoRatio(0.8f);//视频质量 ----微信视频 质量大概在 0.8f 左右, 要清晰一点,就调节大一些

//videoFragment.setVideoMaxZie(50 * 1024 * 1024);//默认50MB

videoFragment.setOnCameraVideoListener(new CameraVideoFragment.OnCameraVideoListener() {

@Override

public void onFragmentResult(String path, String type) {

L.d(path);

}

});

FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();

transaction.add(R.id.videoFragment, videoFragment);

transaction.commit();

#第三方 引用 dependencies

```html

dependencies {

compile fileTree(include: ['*.jar'], dir: 'libs')

compile 'com.android.support:support-v4:25.1.0'

compile 'com.github.bumptech.glide:glide:3.7.0'

compile 'com.sprylab.android.texturevideoview:texturevideoview:1.2.1'

compile 'com.android.support:recyclerview-v7:25.1.0'

}

```

License

-------

Copyright 2017 Wasabeef

Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and

limitations under the License.

相关文章

  • 这几个小技巧,带你玩转探记相册 | 探记使用手册

    相册 1.关于探记的相册 “动态相册”和“普通相册”两种类型。 动态相册默认展示在所有相册的第一个,其余都是用户自...

  • 写唐诗宋词

    东平相册 点击蓝字东平相册

  • 抄唐诗宋词

    东平相册 (点击蓝字东平相册)

  • 照片框架PhotoKit使用记录

    1、创建自定义相册并命名 2、保存图片至相册 3、从指定相册读取照片资源 4、删除指定相册的指定图片 5、将相册中...

  • iOS学习笔记(9-16)

    1、相册相关 PHAssetCollection 相册集合PHAsset 每一个相册资源,从PHAssetColl...

  • iOS 保存图片到自定义相册

    保存到相册的方法 获取相册

  • 相机、图片、二维码处理

    ------拍照、相册------****TakePhoto~20180402****album相册~201806...

  • 相册

    方寸之间,似水流年,终有一天我们会在一本本相册里看到长大后的自己。以前视作生命全部的事现在还在乎吗?

  • 相册

    相册里 有很多的流云 很多的开着的和谢了的花 很多的斜晖朝露 还有,很多的你 都是些易失易散啊 你看那照片里流转着...

  • 相册

    相册 搬块石头去我并非叫你砸脚垫在脚下好高高地看清楚远方的景 这景固定在你的眼中纸片上固定下石头与你远眺的影子风在...

网友评论

      本文标题:相册

      本文链接:https://www.haomeiwen.com/subject/szbgfxtx.html