steelkiwi / cropiwa

📐 Configurable Custom Crop widget for Android
http://steelkiwi.com/
2.23k stars 331 forks source link

How to use this library for camera #54

Open nvish-umeshsharma opened 5 years ago

kushanshah11 commented 5 years ago

@nvish-umeshsharma Same as Gallery

GET_IMAGE_FROM_CAMERA -> if (resultCode == Activity.RESULT_OK) { if (photoFile != null) { val picUri = Uri.fromFile(photoFile)

                    startCropActivity(picUri)

                }
            }

private fun startCropActivity(uri: Uri?) { val bundle = Bundle() bundle.putString("URI123", uri.toString())
FragmentUtils.addFragment(CropFragment.create(bundle), activity!!.supportFragmentManager) }

Hope this helps you.