Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: Deprecate CropImageActivity. #635

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ import com.canhub.cropper.databinding.CropImageActivityBinding
import com.canhub.cropper.utils.getUriForFile
import java.io.File

@Deprecated(
message = """
Create your own Activity and use the CropImageView directly.
This way you can customize everything and have utter control of everything.
Feel free to use this Activity Code to create your own Activity.
""",
)
open class CropImageActivity :
AppCompatActivity(),
OnSetImageUriCompleteListener,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.activity.result.contract.ActivityResultContract
* If you do not provide an [CropImageContractOptions.uri] in the input the user will be asked to pick an image before cropping.
*/
class CropImageContract : ActivityResultContract<CropImageContractOptions, CropImageView.CropResult>() {
@Suppress("DEPRECATION")
override fun createIntent(context: Context, input: CropImageContractOptions) = Intent(context, CropImageActivity::class.java).apply {
putExtra(
CropImage.CROP_IMAGE_EXTRA_BUNDLE,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")

package com.canhub.cropper

import android.app.Activity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")

package com.canhub.cropper.sample

import android.net.Uri
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")

package com.canhub.cropper.sample

import android.app.Activity
Expand Down
Loading