CanHub / Android-Image-Cropper

Image Cropping Library for Android, optimised for Camera / Gallery.
https://canhub.github.io/
Apache License 2.0
1.17k stars 238 forks source link

When using Theme.Material3.DayNight.NoActionBar, the Support Action bar ofcourse doesnt show up when using the pregiven activity #584

Closed soljic95 closed 11 months ago

soljic95 commented 11 months ago

Hi, so my apps theme is as stated :Theme.Material3.DayNight.NoActionBar. When i use :

private fun startCrop(imageUri: Uri) { // Start cropping activity for pre-acquired image saved on the device and customize settings. cropImage.launch( CropImageContractOptions( uri = imageUri, CropImageOptions( guidelines = CropImageView.Guidelines.ON, outputCompressFormat = Bitmap.CompressFormat.PNG, cropCornerRadius = 50.0f, showCropLabel = true, autoZoomEnabled = false, maxZoom = 0, fixAspectRatio = true, maxCropResultHeight = 1000, maxCropResultWidth = 1000, minCropWindowHeight = 600, showCropOverlay = true, minCropWindowWidth = 600, activityTitle = "Set profile picture", cropMenuCropButtonTitle = "Crop", activityMenuTextColor = ContextCompat.getColor( activity, R.color.red ), cropMenuCropButtonIcon = R.color.red, cropperLabelText = "Crop me please", toolbarColor = ContextCompat.getColor( activity, R.color.red ) ) ) ) }

It launches the CropImageActivity but there is no support action bar. I was wondering if there was some way to force it, or do i need to make my own activity for it to work.

Thank you!
soljic95 commented 11 months ago

Sorry ! Didnt read the

<activity android:name="com.canhub.cropper.CropImageActivity" android:theme="@style/Base.Theme.AppCompat" />

Part ! Im closing the issue!