Compare commits
2 Commits
1cab607fa1
...
d572a8d2dc
Author | SHA1 | Date |
---|---|---|
Matéo Duparc | d572a8d2dc | |
Matéo Duparc | 01a9c261f5 |
|
@ -57,7 +57,7 @@ android {
|
|||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "androidx.core:core-ktx:1.6.0"
|
||||
implementation 'androidx.core:core-ktx:1.7.0'
|
||||
implementation "androidx.appcompat:appcompat:1.3.1"
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.1.1"
|
||||
|
||||
|
@ -68,7 +68,7 @@ dependencies {
|
|||
implementation "com.github.bumptech.glide:glide:4.12.0"
|
||||
implementation "androidx.biometric:biometric:1.1.0"
|
||||
|
||||
def exoplayer_version = "2.15.1"
|
||||
def exoplayer_version = "2.16.0"
|
||||
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
|
||||
implementation "com.google.android.exoplayer:exoplayer-ui:$exoplayer_version"
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit bd5d53f50eb274ed084e9f363ccfbe30d9061039
|
||||
Subproject commit 19731536027d0b64c19742846bf8dda6920110ba
|
|
@ -150,8 +150,20 @@ class ImageViewer: FileViewerActivity() {
|
|||
|
||||
private fun loadImage(){
|
||||
loadWholeFile(filePath)?.let {
|
||||
bitmap = BitmapFactory.decodeByteArray(it, 0, it.size)
|
||||
Glide.with(this).load(bitmap).into(binding.imageViewer)
|
||||
val displayWithGlide = if (it.size < 5_000_000) {
|
||||
true
|
||||
} else {
|
||||
val decodedBitmap = BitmapFactory.decodeByteArray(it, 0, it.size)
|
||||
if (decodedBitmap == null) {
|
||||
true
|
||||
} else {
|
||||
Glide.with(this).load(decodedBitmap).fitCenter().into(binding.imageViewer)
|
||||
false
|
||||
}
|
||||
}
|
||||
if (displayWithGlide) {
|
||||
Glide.with(this).load(it).into(binding.imageViewer)
|
||||
}
|
||||
fileName = File(filePath).name
|
||||
binding.textFilename.text = fileName
|
||||
rotationAngle = 0F
|
||||
|
|
Loading…
Reference in New Issue