From e6af02a35c963b189a8576fac1c64b4cb9639e88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Fri, 15 Jan 2021 12:29:56 +0100 Subject: [PATCH] Update Android Dependencies --- android/app/build.gradle | 14 +++++++------- .../com/metallic/chiaki/stream/StreamActivity.kt | 12 +----------- .../app/src/main/res/layout/activity_stream.xml | 1 + android/build.gradle | 4 ++-- android/gradle/wrapper/gradle-wrapper.properties | 4 ++-- 5 files changed, 13 insertions(+), 22 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index fde2388..2b2c248 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -94,19 +94,19 @@ androidExtensions { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.core:core-ktx:1.2.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.core:core-ktx:1.3.2' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'androidx.preference:preference:1.1.0' - implementation 'com.google.android.material:material:1.1.0-beta02' + implementation 'androidx.preference:preference:1.1.1' + implementation 'com.google.android.material:material:1.2.1' implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0' implementation 'androidx.lifecycle:lifecycle-reactivestreams:2.2.0' - implementation "io.reactivex.rxjava2:rxjava:2.2.12" + implementation "io.reactivex.rxjava2:rxjava:2.2.20" implementation "io.reactivex.rxjava2:rxkotlin:2.4.0" implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' - def room_version = "2.2.4" + def room_version = "2.2.6" implementation "androidx.room:room-runtime:$room_version" kapt "androidx.room:room-compiler:$room_version" implementation "androidx.room:room-ktx:$room_version" diff --git a/android/app/src/main/java/com/metallic/chiaki/stream/StreamActivity.kt b/android/app/src/main/java/com/metallic/chiaki/stream/StreamActivity.kt index 32b9fd3..9779987 100644 --- a/android/app/src/main/java/com/metallic/chiaki/stream/StreamActivity.kt +++ b/android/app/src/main/java/com/metallic/chiaki/stream/StreamActivity.kt @@ -44,7 +44,6 @@ class StreamActivity : AppCompatActivity(), View.OnSystemUiVisibilityChangeListe private lateinit var viewModel: StreamViewModel private val uiVisibilityHandler = Handler() - private val streamView: View get() = surfaceView override fun onCreate(savedInstanceState: Bundle?) { @@ -88,13 +87,7 @@ class StreamActivity : AppCompatActivity(), View.OnSystemUiVisibilityChangeListe showOverlay() } - displayModeToggle.addOnButtonCheckedListener { _, checkedId, _ -> - // following 'if' is a workaround until selectionRequired for MaterialButtonToggleGroup - // comes out of alpha. - // See https://stackoverflow.com/questions/56164004/required-single-selection-on-materialbuttontogglegroup - if (displayModeToggle.checkedButtonId == -1) - displayModeToggle.check(checkedId) - + displayModeToggle.addOnButtonCheckedListener { _, _, _ -> adjustStreamViewAspect() showOverlay() } @@ -102,9 +95,6 @@ class StreamActivity : AppCompatActivity(), View.OnSystemUiVisibilityChangeListe //viewModel.session.attachToTextureView(textureView) viewModel.session.attachToSurfaceView(surfaceView) viewModel.session.state.observe(this, Observer { this.stateChanged(it) }) - /*streamView.addOnLayoutChangeListener { _, _, _, _, _, _, _, _, _ -> - adjustStreamViewAspect() - }*/ adjustStreamViewAspect() if(Preferences(this).rumbleEnabled) diff --git a/android/app/src/main/res/layout/activity_stream.xml b/android/app/src/main/res/layout/activity_stream.xml index 9c944c3..99eea1b 100644 --- a/android/app/src/main/res/layout/activity_stream.xml +++ b/android/app/src/main/res/layout/activity_stream.xml @@ -83,6 +83,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:singleSelection="true" + app:selectionRequired="true" app:checkedButton="@id/display_mode_normal_button">