本文整理汇总了Java中com.nguyenhoanglam.imagepicker.activity.ImagePicker类的典型用法代码示例。如果您正苦于以下问题:Java ImagePicker类的具体用法?Java ImagePicker怎么用?Java ImagePicker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ImagePicker类属于com.nguyenhoanglam.imagepicker.activity包,在下文中一共展示了ImagePicker类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onOptionsItemSelected
import com.nguyenhoanglam.imagepicker.activity.ImagePicker; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if(item.getItemId() == R.id.event_gallery_upload_new) {
ImagePicker.create(EventGalleryActivity.this)
.folderMode(true)
.folderTitle(getString(R.string.my_images))
.imageTitle(getString(R.string.select))
.showCamera(true)
.multi()
.imageDirectory("Images/ *jpg")
.start(REQUEST_CODE_PICKER);
}
return true;
}
示例2: pickImage
import com.nguyenhoanglam.imagepicker.activity.ImagePicker; //导入依赖的package包/类
private void pickImage() {
ImagePicker.create(this)
.folderMode(true)
.folderTitle(getString(R.string.title_activity_image_picker_folders))
.single()
.showCamera(true)
.start(REQUEST_IMAGE_PICKER);
}