updating kotlin, gradle and target SDK to 33
This commit is contained in:
parent
c6330f4991
commit
443230268f
|
@ -10,12 +10,12 @@ if (keystorePropertiesFile.exists()) {
|
|||
}
|
||||
|
||||
android {
|
||||
compileSdk 31
|
||||
compileSdk 33
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.simplemobiletools.gallery.pro"
|
||||
minSdk 21
|
||||
targetSdk 31
|
||||
targetSdk 33
|
||||
versionCode 374
|
||||
versionName "6.24.1"
|
||||
setProperty("archivesBaseName", "gallery-$versionCode")
|
||||
|
@ -78,7 +78,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:0c82e5f216'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:28e3b108e7'
|
||||
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.24'
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<uses-permission android:name="android.permission.SET_WALLPAPER" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission
|
||||
android:name="android.permission.MANAGE_MEDIA"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
|
|
|
@ -188,7 +188,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
}
|
||||
|
||||
top_shadow.layoutParams.height = statusBarHeight + actionBarHeight
|
||||
if (!portrait && navigationBarRight && navigationBarWidth > 0) {
|
||||
if (!portrait && navigationBarOnSide && navigationBarWidth > 0) {
|
||||
fragment_viewer_toolbar.setPadding(0, 0, navigationBarWidth, 0)
|
||||
} else {
|
||||
fragment_viewer_toolbar.setPadding(0, 0, 0, 0)
|
||||
|
@ -285,7 +285,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||
|
||||
top_shadow.layoutParams.height = statusBarHeight + actionBarHeight
|
||||
(fragment_viewer_appbar.layoutParams as RelativeLayout.LayoutParams).topMargin = statusBarHeight
|
||||
if (!portrait && navigationBarRight && navigationBarWidth > 0) {
|
||||
if (!portrait && navigationBarOnSide && navigationBarWidth > 0) {
|
||||
fragment_viewer_toolbar.setPadding(0, 0, navigationBarWidth, 0)
|
||||
} else {
|
||||
fragment_viewer_toolbar.setPadding(0, 0, 0, 0)
|
||||
|
|
|
@ -87,7 +87,7 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
|||
|
||||
updateTextColors(video_player_holder)
|
||||
|
||||
if (!portrait && navigationBarRight && navigationBarWidth > 0) {
|
||||
if (!portrait && navigationBarOnSide && navigationBarWidth > 0) {
|
||||
video_toolbar.setPadding(0, 0, navigationBarWidth, 0)
|
||||
} else {
|
||||
video_toolbar.setPadding(0, 0, 0, 0)
|
||||
|
@ -149,7 +149,7 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
|||
|
||||
top_shadow.layoutParams.height = statusBarHeight + actionBarHeight
|
||||
(video_appbar.layoutParams as RelativeLayout.LayoutParams).topMargin = statusBarHeight
|
||||
if (!portrait && navigationBarRight && navigationBarWidth > 0) {
|
||||
if (!portrait && navigationBarOnSide && navigationBarWidth > 0) {
|
||||
video_toolbar.setPadding(0, 0, navigationBarWidth, 0)
|
||||
} else {
|
||||
video_toolbar.setPadding(0, 0, 0, 0)
|
||||
|
@ -191,11 +191,8 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
|||
|
||||
|
||||
val gestureDetector = GestureDetector(this, object : GestureDetector.SimpleOnGestureListener() {
|
||||
override fun onDoubleTap(e: MotionEvent?): Boolean {
|
||||
if (e != null) {
|
||||
handleDoubleTap(e.rawX)
|
||||
}
|
||||
|
||||
override fun onDoubleTap(e: MotionEvent): Boolean {
|
||||
handleDoubleTap(e.rawX)
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
|
|
@ -529,10 +529,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
val oldPosition = view_pager.currentItem
|
||||
val animator = ValueAnimator.ofInt(0, view_pager.width)
|
||||
animator.addListener(object : Animator.AnimatorListener {
|
||||
override fun onAnimationRepeat(animation: Animator?) {
|
||||
}
|
||||
|
||||
override fun onAnimationEnd(animation: Animator?) {
|
||||
override fun onAnimationEnd(animation: Animator) {
|
||||
if (view_pager.isFakeDragging) {
|
||||
try {
|
||||
view_pager.endFakeDrag()
|
||||
|
@ -546,12 +543,13 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
}
|
||||
|
||||
override fun onAnimationCancel(animation: Animator?) {
|
||||
override fun onAnimationCancel(animation: Animator) {
|
||||
view_pager.endFakeDrag()
|
||||
}
|
||||
|
||||
override fun onAnimationStart(animation: Animator?) {
|
||||
}
|
||||
override fun onAnimationStart(animation: Animator) {}
|
||||
|
||||
override fun onAnimationRepeat(animation: Animator) {}
|
||||
})
|
||||
|
||||
if (config.slideshowAnimation == SLIDESHOW_ANIMATION_SLIDE) {
|
||||
|
@ -831,7 +829,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
bottom_actions.beGone()
|
||||
}
|
||||
|
||||
if (!portrait && navigationBarRight && navigationBarWidth > 0) {
|
||||
if (!portrait && navigationBarOnSide && navigationBarWidth > 0) {
|
||||
medium_viewer_toolbar.setPadding(0, 0, navigationBarWidth, 0)
|
||||
} else {
|
||||
medium_viewer_toolbar.setPadding(0, 0, 0, 0)
|
||||
|
|
|
@ -116,7 +116,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||
mTextureView.surfaceTextureListener = this@VideoFragment
|
||||
|
||||
val gestureDetector = GestureDetector(context, object : GestureDetector.SimpleOnGestureListener() {
|
||||
override fun onSingleTapConfirmed(e: MotionEvent?): Boolean {
|
||||
override fun onSingleTapConfirmed(e: MotionEvent): Boolean {
|
||||
if (!mConfig.allowInstantChange) {
|
||||
toggleFullscreen()
|
||||
return true
|
||||
|
@ -124,7 +124,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||
|
||||
val viewWidth = width
|
||||
val instantWidth = viewWidth / 7
|
||||
val clickedX = e?.rawX ?: 0f
|
||||
val clickedX = e.rawX
|
||||
when {
|
||||
clickedX <= instantWidth -> listener?.goToPrevItem()
|
||||
clickedX >= viewWidth - instantWidth -> listener?.goToNextItem()
|
||||
|
@ -133,11 +133,8 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||
return true
|
||||
}
|
||||
|
||||
override fun onDoubleTap(e: MotionEvent?): Boolean {
|
||||
if (e != null) {
|
||||
handleDoubleTap(e.rawX)
|
||||
}
|
||||
|
||||
override fun onDoubleTap(e: MotionEvent): Boolean {
|
||||
handleDoubleTap(e.rawX)
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
|
|
@ -39,8 +39,10 @@ class MediaSideScroll(context: Context, attrs: AttributeSet) : RelativeLayout(co
|
|||
private lateinit var slideInfoView: TextView
|
||||
private lateinit var singleTap: (Float, Float) -> Unit
|
||||
|
||||
fun initialize(activity: Activity, slideInfoView: TextView, isBrightness: Boolean, parentView: ViewGroup?, singleTap: (x: Float, y: Float) -> Unit,
|
||||
doubleTap: ((x: Float, y: Float) -> Unit)? = null) {
|
||||
fun initialize(
|
||||
activity: Activity, slideInfoView: TextView, isBrightness: Boolean, parentView: ViewGroup?, singleTap: (x: Float, y: Float) -> Unit,
|
||||
doubleTap: ((x: Float, y: Float) -> Unit)? = null
|
||||
) {
|
||||
this.activity = activity
|
||||
this.slideInfoView = slideInfoView
|
||||
this.singleTap = singleTap
|
||||
|
@ -54,15 +56,13 @@ class MediaSideScroll(context: Context, attrs: AttributeSet) : RelativeLayout(co
|
|||
}
|
||||
|
||||
private val gestureDetector = GestureDetector(context, object : GestureDetector.SimpleOnGestureListener() {
|
||||
override fun onSingleTapConfirmed(e: MotionEvent?): Boolean {
|
||||
if (e != null) {
|
||||
singleTap(e.rawX, e.rawY)
|
||||
}
|
||||
override fun onSingleTapConfirmed(e: MotionEvent): Boolean {
|
||||
singleTap(e.rawX, e.rawY)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onDoubleTap(e: MotionEvent?): Boolean {
|
||||
if (e != null && doubleTap != null) {
|
||||
override fun onDoubleTap(e: MotionEvent): Boolean {
|
||||
if (doubleTap != null) {
|
||||
doubleTap!!.invoke(e.rawX, e.rawY)
|
||||
}
|
||||
return true
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/color_primary"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:title="@string/settings"
|
||||
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
buildscript {
|
||||
// needed only if we are including commons locally from our pc, not via Jitpack
|
||||
/*ext {
|
||||
propCompileSdkVersion = 31
|
||||
propCompileSdkVersion = 33
|
||||
propMinSdkVersion = 21
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '5.34.26'
|
||||
}*/
|
||||
|
||||
ext.kotlin_version = '1.6.21'
|
||||
ext.kotlin_version = '1.7.10'
|
||||
ext.is_proprietary = gradle.startParameter.taskNames.any { task -> task.contains("Proprietary") }
|
||||
|
||||
repositories {
|
||||
|
@ -22,10 +22,10 @@ buildscript {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.1.3'
|
||||
classpath 'com.android.tools.build:gradle:7.2.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
if (is_proprietary) {
|
||||
classpath 'ly.img.android.pesdk:plugin:10.2.1'
|
||||
classpath 'ly.img.android.pesdk:plugin:10.3.0'
|
||||
}
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
|
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||
|
|
Loading…
Reference in New Issue