Skip to content
Commit 458eef30 authored by Roy Chou's avatar Roy Chou
Browse files

chore(#MagSettingsPanel): adjust SeekBarWithIconButtonsView callbacks

Originally, when clicking icon start/end on view, it would trigger seekbar.setProgress, then the seekbar will update position then trigger callback onProgressChanged with parameter fromUser false. This should be considered as user triggered action too. Therefore, we add new flag mSetProgressFromButtonFlag to help check if the progress changed is triggered by clicking icon button. If the flag is set, SeekBarWithIconButtonsViews would trigger onProgressChanged with parameter fromUser true. Beside, we extend OnSeekBarChangeListener to new interface OnSeekBarWithIconButtonsChangeListener and add method onUserInteractionFinalized in the interface. With the new method, outside listeners can distinguish whether the seekbar progress changed is trigger by dragging the slider or cliking the button.

Bug: 286176069
Test: manually
      atest SeekBarWithIconButtonsViewTest
      atest FontScalingDialogTest
      atest WindowMagnificationSettingsTest
Change-Id: Ibb579a543e5c9286ed88faba8eef5d67f5a902f1
parent 11b85acc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment