Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Rapid Test Profile shows mixed languages after change in locale (EXPOSUREAPP-9151) #5668

Merged
merged 6 commits into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Corona-Warn-App/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ android {
println("Current VERSION_PATCH: ${VERSION_PATCH}")
println("Current VERSION_BUILD: ${VERSION_BUILD}")

compileSdkVersion 31
compileSdkVersion 32
buildToolsVersion "32.0.0"
defaultConfig {
applicationId 'de.rki.coronawarnapp'
minSdkVersion 23
targetSdkVersion 31
targetSdkVersion 32

ndkVersion "21.2.6472646"

Expand Down Expand Up @@ -347,7 +347,7 @@ dependencies {
// ANDROID STANDARD
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
android:layout_margin="@dimen/spacing_tiny"
android:orientation="vertical">

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/fake_correct_devicetime_toggle"
app:thumbTint="@color/colorCertificateUserSwitch"
android:layout_width="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
android:layout_margin="@dimen/spacing_tiny"
android:orientation="vertical">

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/disable_safetynet_toggle"
android:layout_width="match_parent"
android:layout_height="0dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Check against allow list" />
<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/swich_service_identity_check"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_contact_journal_onboarding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -136,7 +136,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_delta_onboarding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -163,7 +163,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_attendee_onboarding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -190,7 +190,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_vaccination_onboarding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -217,15 +217,15 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_notifications_delta_onboarding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_small"
android:text="Notifications onboarding finished"
app:layout_constraintTop_toBottomOf="@id/notifications_delta_onboarding_title" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_analytics_delta_onboarding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/fake_metered_connection_toggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.TextView
import androidx.constraintlayout.widget.ConstraintLayout
import com.google.android.material.switchmaterial.SwitchMaterial
import com.google.android.material.materialswitch.MaterialSwitch
import de.rki.coronawarnapp.R

class SwitchRowView @JvmOverloads constructor(
Expand All @@ -14,7 +14,7 @@ class SwitchRowView @JvmOverloads constructor(
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) {

private val switch by lazy { findViewById<SwitchMaterial>(R.id.switch_view) }
private val switch by lazy { findViewById<MaterialSwitch>(R.id.switch_view) }
private val title by lazy { findViewById<TextView>(R.id.switch_title) }
private val subtitleView by lazy { findViewById<TextView>(R.id.switch_subtitle) }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import com.airbnb.lottie.LottieAnimationView
import com.airbnb.lottie.LottieDrawable
import com.airbnb.lottie.LottieProperty
import com.airbnb.lottie.model.KeyPath
import com.google.android.material.materialswitch.MaterialSwitch
import com.google.android.material.progressindicator.CircularProgressIndicator
import com.google.android.material.switchmaterial.SwitchMaterial
import de.rki.coronawarnapp.util.ContextExtensions.getDrawableCompat

const val IGNORE_CHANGE_TAG = "ignore"
const val DRAWABLE_TYPE = "drawable"

@BindingAdapter("checked")
fun setChecked(switch: SwitchMaterial, status: Boolean?) {
fun setChecked(switch: MaterialSwitch, status: Boolean?) {
if (status != null) {
switch.tag = IGNORE_CHANGE_TAG
switch.isChecked = status
Expand Down
2 changes: 1 addition & 1 deletion Corona-Warn-App/src/main/res/layout/cwa_user_card_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
app:layout_constraintTop_toBottomOf="@id/user_name"
tools:text="geboren 18.04.1943" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/cwa_user_switch"
app:thumbTint="@color/colorCertificateUserSwitch"
android:layout_width="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
android:layout_marginBottom="24dp"
android:orientation="vertical">

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/confirm_checkin_settings_card_checkout_toggle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion Corona-Warn-App/src/main/res/layout/switch_row.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
app:layout_constraintTop_toBottomOf="@+id/switch_title"
tools:text="Active" />

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">

<com.google.android.material.switchmaterial.SwitchMaterial
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down
1 change: 1 addition & 0 deletions Corona-Warn-App/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
<item name="itemIconTint">@color/nav_item_color</item>
<item name="materialThemeOverlay">@style/ThemeOverlay.App.BottomNavigation</item>
<item name="android:background">@color/colorSurface1</item>
<item name="backgroundTint">@color/colorSurface1</item>
<item name="itemActiveIndicatorStyle">@style/BottomNavigationActiveIndicator</item>
</style>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.content.res.Resources
import android.graphics.drawable.Drawable
import com.airbnb.lottie.LottieAnimationView
import com.airbnb.lottie.LottieDrawable
import com.google.android.material.switchmaterial.SwitchMaterial
import com.google.android.material.materialswitch.MaterialSwitch
import de.rki.coronawarnapp.R
import de.rki.coronawarnapp.util.ContextExtensions.getDrawableCompat
import io.mockk.MockKAnnotations
Expand All @@ -32,7 +32,7 @@ class DataBindingAdaptersTest : BaseTest() {
}

private fun setChecked(status: Boolean?) {
val switch = mockk<SwitchMaterial>().apply {
val switch = mockk<MaterialSwitch>().apply {
every { tag = any() } just Runs
every { isChecked = any() } just Runs
}
Expand Down