Skip to content

Commit

Permalink
API: Deprecate CropImageActivity. (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech committed Aug 5, 2024
1 parent e5424e9 commit 1f892e4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
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

0 comments on commit 1f892e4

Please sign in to comment.