updating commons
This commit is contained in:
parent
c96a50b9e9
commit
5202b77e8c
|
@ -78,7 +78,7 @@ android {
|
|||
}
|
||||
|
||||
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 'it.sephiroth.android.exif:library:1.0.1'
|
||||
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.TargetApi
|
||||
import android.app.Activity
|
||||
import android.content.ActivityNotFoundException
|
||||
import android.content.Intent
|
||||
import android.content.pm.ActivityInfo
|
||||
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_NEXT_ITEM, view_pager.currentItem != mMediaFiles.size - 1)
|
||||
|
||||
if (resolveActivity(packageManager) != null) {
|
||||
try {
|
||||
startActivityForResult(this, REQUEST_VIEW_VIDEO)
|
||||
} catch (e: NullPointerException) {
|
||||
showErrorToast(e)
|
||||
}
|
||||
} else {
|
||||
} catch (e: ActivityNotFoundException) {
|
||||
if (!tryGenericMimeType(this, mimeType, newUri)) {
|
||||
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() {
|
||||
val intent = Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA)
|
||||
if (intent.resolveActivity(packageManager) != null) {
|
||||
startActivity(intent)
|
||||
} else {
|
||||
toast(R.string.no_app_found)
|
||||
}
|
||||
launchActivityIntent(intent)
|
||||
}
|
||||
|
||||
fun SimpleActivity.launchAbout() {
|
||||
|
|
Loading…
Reference in New Issue