Base on Matisse,add crop image function and fix some bug,Used in tongzhuogame
Gradle:
compile 'com.github.chaichuanfa:matisse:1.0.5'R.style.Matisse_Tongzhuo (custom mode)
And Also you can define your own theme as you wish.
Matisse.from(SampleActivity.this)
.choose(MimeType.ofStaticImage())
.theme(R.style.Matisse_Tongzhuo)
.countable(false)
.maxSelectable(1)
.spanCount(3)
.thumbnailScale(0.85f)
.singleMediaPreview(false)
.singleImageCrop(true)
.showSingleMediaType(true)
.imageEngine(new PicassoEngine())
.forResult(REQUEST_CODE_CHOOSE);single static image can crop and close preview.
Matisse.from(EditProfileFragment.this)
.choose(MimeType.ofStaticImage())
.openCameraNow(true)
.capture(true)
.captureStrategy(new CaptureStrategy(true,
"com.tongzhuo.tongzhuogame.fileprovider"))
.restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
.theme(R.style.Matisse_Tongzhuo)
.singleImageCrop(true)
.forResult(OPEN_CAMERA_REQUEST_CODE);