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