-
Notifications
You must be signed in to change notification settings - Fork 3k
PictureSelector 2.0 Api
Luck edited this page Jan 9, 2022
·
1 revision
PictureSelector.create(this)
.openGallery()// Album Media Type PictureMimeType.ofAll()、ofImage()、ofVideo()、ofAudio()
//.openCamera()// Camera Album Media Type PictureMimeType.ofImage()、ofVideo()
.theme()// Xml Style R.style.picture_default_style、picture_WeChat_style or More Reference Demo
.imageEngine()// Image loading engine Need to be implements ImageEngine
.selectionMode()// Single or MultiSelect Mode PictureConfig.SINGLE PictureConfig.MULTIPLE
.isPageStrategy()// Turn on paging mode and provide two additional parameters by default. Total number of pages per page; Does isFilterInvalidFile filter corrupted images
.isSingleDirectReturn()// Whether to return directly from PictureConfig.SINGLE Mode
.isWeChatStyle()// Open R.style.picture_WeChat_style
.setPictureStyle()// Dynamically customize the album theme
.setPictureCropStyle()// Dynamically customize tailored themes
.setPictureWindowAnimationStyle()// The album launches and exits the animation
.isCamera()// Whether the list shows the photo button
.isZoomAnim()// Select the zoom effect for the image
.imageFormat()// Photo photo format suffix, default jpeg, PictureMimeType.PNG,Android Q To PictureMimeType.PNG_Q
.setCameraImageFormat(PictureMimeType.JPEG)// camera output image format
.setCameraVideoFormat(PictureMimeType.MP4)// camera output video format
.setCameraAudioFormat(PictureMimeType.AMR)// audio output format
.maxSelectNum()// Maximum number of options, 9 by default
.minSelectNum()// Minimum number of choices
.maxVideoSelectNum()// Maximum number of video options
.minVideoSelectNum()// Minimum number of video choices
.videoMaxSecond()// Query how many seconds of video
.videoMinSecond()// Query how many seconds of video
.imageSpanCount()// The list displays Numbers per row
.openClickSound()// Whether to open click sound
.selectionMedia()// Whether to pass in the selected image
.recordVideoSecond()// The default number of video seconds is 60s
.filterMinFileSize() // Filters the smallest files
.filterMaxFileSize() // Filter the largest files
.queryMimeTypeConditions(PictureMimeType.ofJPEG()) // Queries only for files of the specified MimeType type
.previewEggs()// Preview the image to enhance the left and right slide image experience
.cropCompressQuality()// Out of date use .cutOutQuality()
.compressEngine()// custom image compress engine
.isGif()// Whether to display GIF
.previewImage()// Whether to preview the picture or not
.previewVideo()// Whether to preview the video or not
.enablePreviewAudio()// Whether to preview the audio or not
.enableCrop()// Whether to open crop or not
.cropWH()// Crop aspect ratio, which has been abandoned, is used. CropImageWideHigh () method
.cropImageWideHigh()// Crop the aspect ratio. The setting is invalid if it is larger than the image itself
.withAspectRatio()// Crop aspect
.cutOutQuality()// Crop output quality defaults to 100
.freeStyleCropEnabled()// Crop drag
.freeStyleCropMode(OverlayView.DEFAULT_FREESTYLE_CROP_MODE)// Crop drag mode
.isCropDragSmoothToCenter(true)// Crop drag image auto follow the center
.circleDimmedLayer()// Whether to turn on circle crop
.setCircleDimmedColor()// Sets the color value of the circular clipping background
.setCircleDimmedBorderColor()// Sets the color value of the circle clipping border
.setCircleStrokeWidth()// Set the thickness of the circular crop border
.showCropFrame()// False is recommended for round crop of the clipping rectangle border
.showCropGrid()// It is recommended to set false to show round crop of the crop rectangle grid
.rotateEnabled()// Crop whether the image can be rotated
.scaleEnabled()// Whether the cropping can zoom in and out of the picture
.isDragFrame()// Draggable crop box (fixed)
.hideBottomControls()// Displays the uCrop toolbar at the bottom
.basicUCropConfig()// All the preparation items of ucrop are provided
.compress()// Whether the compression
.compressFocusAlpha()// Whether to keep the image transparent channel after compression
.minimumCompressSize()// Less than how many KB images are not compressed
.videoQuality()// Video recording quality 0 or 1
.compressQuality()// Output quality after image compression
.synOrAsy()// Enable synchronous or asynchronous compression
.queryMaxFileSize()// Query for image, video, and audio sizes within the specified size, unit M
.compressSavePath()// Custom compressed image save address, pay attention to the adaptation of the Q version
.sizeMultiplier()
.glideOverride()
.isMultipleSkipCrop()// Whether multiSelect crop supports skip
.isMultipleRecyclerAnimation()// MultiSelect crop bottom list to show animation
.querySpecifiedFormatSuffix()// Only resources with the specified suffix are queried,PictureMimeType.ofJPEG() ...
.isReturnEmpty()// If no data is selected, press ok to exit
.isAndroidQTransform()// Do you need to copy files into the application sandbox under the Android Q version
.setRequestedOrientation()// Screen rotation direction ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED ...
.isOriginalImageControl()// Turn on the original option
.bindCustomPlayVideoCallback()// Custom video playback interface
.bindCustomCameraInterfaceListener()// custom camera callback interface
.bindCustomPreviewCallback()// custom image preview callback interface
.cameraFileName()// Customize the file name of the photo album, and if the photo is taken within the album, the current timestamp will be automatically spelled internally to prevent duplication
.renameCompressFile()// Custom compressed file name, in the case of multiple compression will automatically spell the current timestamp to prevent duplication
.renameCropFileName()// Custom crop file name, in case of multiple clipping, internal will automatically spell the current timestamp to prevent duplication
.setRecyclerAnimationMode()//List animation,AnimationType.ALPHA_IN_ANIMATION、SLIDE_IN_BOTTOM_ANIMATION
.isUseCustomCamera()// Turn on the custom camera
.setButtonFeatures()// Custom camera button state, customcameraview.button_state_both
.setLanguage()// International language LanguageConfig.CHINESE, ENGLISH, JAPAN, etc
.isWithVideoImage()// Whether the picture and video can be selected together, only works in ofAll mode
.isMaxSelectEnabledMask()// Select whether the list enables the mask effect when the condition reaches the valve
.isAutomaticTitleRecyclerTop()// Click on the top title bar to scroll back quickly to the top
.loadCacheResourcesCallback()// Get the ImageEngine cache image, refer to the Demo
.setOutputCameraPath()// The custom camera output directory is only for the following version of Android Q, please refer to the Demo for details
.forResult();