updating commons
This commit is contained in:
parent
c96a50b9e9
commit
5202b77e8c
3 changed files with 8 additions and 13 deletions
|
@ -78,7 +78,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.34.25'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:b3a9e4114f'
|
||||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||||
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22'
|
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.22'
|
||||||
|
|
|
@ -5,6 +5,7 @@ import android.animation.ValueAnimator
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.annotation.TargetApi
|
import android.annotation.TargetApi
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.pm.ActivityInfo
|
import android.content.pm.ActivityInfo
|
||||||
import android.content.pm.ShortcutInfo
|
import android.content.pm.ShortcutInfo
|
||||||
|
@ -1236,16 +1237,14 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
putExtra(SHOW_PREV_ITEM, view_pager.currentItem != 0)
|
putExtra(SHOW_PREV_ITEM, view_pager.currentItem != 0)
|
||||||
putExtra(SHOW_NEXT_ITEM, view_pager.currentItem != mMediaFiles.size - 1)
|
putExtra(SHOW_NEXT_ITEM, view_pager.currentItem != mMediaFiles.size - 1)
|
||||||
|
|
||||||
if (resolveActivity(packageManager) != null) {
|
try {
|
||||||
try {
|
startActivityForResult(this, REQUEST_VIEW_VIDEO)
|
||||||
startActivityForResult(this, REQUEST_VIEW_VIDEO)
|
} catch (e: ActivityNotFoundException) {
|
||||||
} catch (e: NullPointerException) {
|
|
||||||
showErrorToast(e)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!tryGenericMimeType(this, mimeType, newUri)) {
|
if (!tryGenericMimeType(this, mimeType, newUri)) {
|
||||||
toast(R.string.no_app_found)
|
toast(R.string.no_app_found)
|
||||||
}
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
showErrorToast(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,11 +74,7 @@ fun Activity.openEditor(path: String, forceChooser: Boolean = false) {
|
||||||
|
|
||||||
fun Activity.launchCamera() {
|
fun Activity.launchCamera() {
|
||||||
val intent = Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA)
|
val intent = Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA)
|
||||||
if (intent.resolveActivity(packageManager) != null) {
|
launchActivityIntent(intent)
|
||||||
startActivity(intent)
|
|
||||||
} else {
|
|
||||||
toast(R.string.no_app_found)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun SimpleActivity.launchAbout() {
|
fun SimpleActivity.launchAbout() {
|
||||||
|
|
Loading…
Reference in a new issue