Update dependencies

This commit is contained in:
Matthieu 2023-11-03 17:49:08 +01:00
parent d393b083ae
commit fc43bc2ff4
3 changed files with 35 additions and 32 deletions

View File

@ -20,8 +20,7 @@ jacoco.toolVersion = "0.8.7"
android {
namespace 'org.pixeldroid.app'
compileSdkVersion 33
buildToolsVersion '33.0.1'
compileSdk 34
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
@ -38,8 +37,8 @@ android {
}
defaultConfig {
minSdkVersion 23
targetSdkVersion 33
versionCode 24
targetSdkVersion 34
versionName "1.0.beta" + versionCode
//TODO add resConfigs("en", "fr", "ja",...) ?
@ -143,25 +142,25 @@ dependencies {
*/
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-splashscreen:1.0.1'
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.6.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.6.0'
implementation "androidx.browser:browser:1.5.0"
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.4'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.4'
implementation "androidx.browser:browser:1.6.0"
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation 'androidx.navigation:navigation-fragment-ktx:2.6.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.6.0'
implementation 'androidx.paging:paging-runtime-ktx:3.2.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1'
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.1"
implementation "androidx.lifecycle:lifecycle-common-java8:2.6.1"
implementation "androidx.annotation:annotation:1.6.0"
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.4'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.4'
implementation 'androidx.paging:paging-runtime-ktx:3.2.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
implementation 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.2'
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.2"
implementation "androidx.lifecycle:lifecycle-common-java8:2.6.2"
implementation "androidx.annotation:annotation:1.7.0"
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation "androidx.activity:activity-ktx:1.7.2"
implementation "androidx.activity:activity-ktx:1.8.0"
implementation 'androidx.fragment:fragment-ktx:1.6.1'
implementation 'androidx.work:work-runtime-ktx:2.8.1'
implementation 'androidx.media2:media2-widget:1.2.1'
@ -169,7 +168,7 @@ dependencies {
// Use the most recent version of CameraX
def cameraX_version = '1.2.3'
def cameraX_version = '1.3.0'
implementation "androidx.camera:camera-core:$cameraX_version"
implementation "androidx.camera:camera-camera2:$cameraX_version"
// CameraX Lifecycle library
@ -178,7 +177,7 @@ dependencies {
// CameraX View class
implementation "androidx.camera:camera-view:$cameraX_version"
def room_version = "2.5.2"
def room_version = "2.6.0"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"
@ -191,7 +190,7 @@ dependencies {
implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0'
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.android.material:material:1.10.0'
//Dagger (dependency injection)
implementation 'com.google.dagger:dagger-android:2.45'

View File

@ -96,11 +96,12 @@ class NestedScrollableHost(context: Context, attrs: AttributeSet? = null) :
return super.onSingleTapConfirmed(e)
}
override fun onScroll(
e1: MotionEvent,
e1: MotionEvent?,
e2: MotionEvent,
distanceX: Float,
distanceY: Float
): Boolean {
if (e1 == null) return false
val orientation = parentViewPager?.orientation ?: return true
val dx = e2.x - e1.x

View File

@ -65,17 +65,20 @@ class SettingsActivity : ThemedActivity(), SharedPreferences.OnSharedPreferenceC
super.onBackPressed()
}
}
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) {
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
sharedPreferences?.let {
when (key) {
"theme" -> {
setThemeFromPreferences(sharedPreferences, resources)
setThemeFromPreferences(it, resources)
recreateWithRestartStatus()
}
"themeColor" -> {
recreateWithRestartStatus()
}
}
}
}
/**
* Mark main activity to be changed and recreate the current one