Cwa-app-android: Settings switches don't work when sliding them

Created on 17 Jun 2020  路  5Comments  路  Source: corona-warn-app/cwa-app-android

Describe the bug

When you slide a switch in the app settings, the option doesn't change.

Expected behaviour

When sliding a switch in the app settings the option should change.

Steps to reproduce the issue

Go into the apps settings, to notifications or tracing.
Instead of clicking the switch, drag / slide it manually with your finger.
See that the option did not change.

Technical details

OnePlus 7 Pro OxygenOS 10 (Android 10)
App version 1.0.0

Possible Fix

Add an additional listener, I'll look into it.

bug in progress

All 5 comments

Adding a simple OnDragListener wouldn't really work, as the user might start sliding it, but then slide it back, so only having the toggleSetting() function doesn't really help.
We'd either need a setSetting(boolean state) or get the switch position before the user starts sliding and on USER_DRAG_FINISHED (or similar) compare the previous state with the current one and toggle or don't toggle accordingly.

I think setOnCheckedChangeListener is the proper listener for this?

setOnCheckedChangeListener leaves the options quickly flickering on and off for me.

i did some work in #612 can you check if the flickering happens there for you?

This works perfectly, no flickering happening

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Alestrix picture Alestrix  路  3Comments

FrankfurterRadler picture FrankfurterRadler  路  3Comments

Diapolo picture Diapolo  路  3Comments

wmertens picture wmertens  路  3Comments

HuiiBuh picture HuiiBuh  路  3Comments