mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
Upgraded to 4.5.0 (we can't use 4.6.0 yet due to kotlin 2.0 usage)
This commit is contained in:
parent
fea17d77a1
commit
2aeb769815
@ -284,7 +284,7 @@ dependencies {
|
|||||||
implementation 'com.pnikosis:materialish-progress:1.5'
|
implementation 'com.pnikosis:materialish-progress:1.5'
|
||||||
implementation 'org.greenrobot:eventbus:3.0.0'
|
implementation 'org.greenrobot:eventbus:3.0.0'
|
||||||
implementation 'pl.tajchert:waitingdots:0.1.0'
|
implementation 'pl.tajchert:waitingdots:0.1.0'
|
||||||
implementation 'com.vanniktech:android-image-cropper:4.3.3'
|
implementation 'com.vanniktech:android-image-cropper:4.5.0'
|
||||||
implementation 'com.melnykov:floatingactionbutton:1.3.0'
|
implementation 'com.melnykov:floatingactionbutton:1.3.0'
|
||||||
implementation 'com.google.zxing:android-integration:3.1.0'
|
implementation 'com.google.zxing:android-integration:3.1.0'
|
||||||
implementation 'mobi.upod:time-duration-picker:1.1.3'
|
implementation 'mobi.upod:time-duration-picker:1.1.3'
|
||||||
|
@ -10,8 +10,8 @@ import android.provider.MediaStore
|
|||||||
import androidx.activity.result.ActivityResultLauncher
|
import androidx.activity.result.ActivityResultLauncher
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import com.canhub.cropper.CropImageContractOptions
|
import com.canhub.cropper.CropImageContractOptions
|
||||||
|
import com.canhub.cropper.CropImageOptions
|
||||||
import com.canhub.cropper.CropImageView
|
import com.canhub.cropper.CropImageView
|
||||||
import com.canhub.cropper.options
|
|
||||||
import network.loki.messenger.R
|
import network.loki.messenger.R
|
||||||
import org.session.libsession.utilities.getColorFromAttr
|
import org.session.libsession.utilities.getColorFromAttr
|
||||||
import org.session.libsignal.utilities.ExternalStorageUtil.getImageDir
|
import org.session.libsignal.utilities.ExternalStorageUtil.getImageDir
|
||||||
@ -43,19 +43,28 @@ class AvatarSelection(
|
|||||||
outputFile: Uri?
|
outputFile: Uri?
|
||||||
) {
|
) {
|
||||||
onAvatarCropped.launch(
|
onAvatarCropped.launch(
|
||||||
options(inputFile) {
|
CropImageContractOptions(
|
||||||
setGuidelines(CropImageView.Guidelines.ON)
|
uri = inputFile,
|
||||||
setAspectRatio(1, 1)
|
cropImageOptions = CropImageOptions(
|
||||||
setCropShape(CropImageView.CropShape.OVAL)
|
guidelines = CropImageView.Guidelines.ON,
|
||||||
setOutputUri(outputFile)
|
aspectRatioX = 1,
|
||||||
setAllowRotation(true)
|
aspectRatioY = 1,
|
||||||
setAllowFlipping(true)
|
fixAspectRatio = true,
|
||||||
setBackgroundColor(imageScrim)
|
cropShape = CropImageView.CropShape.OVAL,
|
||||||
setToolbarColor(bgColor)
|
customOutputUri = outputFile,
|
||||||
setActivityBackgroundColor(bgColor)
|
allowRotation = true,
|
||||||
setToolbarTintColor(txtColor)
|
allowFlipping = true,
|
||||||
setActivityTitle(activityTitle)
|
backgroundColor = imageScrim,
|
||||||
}
|
toolbarColor = bgColor,
|
||||||
|
activityBackgroundColor = bgColor,
|
||||||
|
toolbarTintColor = txtColor,
|
||||||
|
toolbarBackButtonColor = txtColor,
|
||||||
|
toolbarTitleColor = txtColor,
|
||||||
|
activityMenuIconColor = txtColor,
|
||||||
|
activityMenuTextColor = txtColor,
|
||||||
|
activityTitle = activityTitle
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user