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
Loading
Please register or sign in to comment