Provides text preview whenever the seekbar progress changes
When the font scale is modified by the icon buttons, we also like to show the preview of text first to avoid the feeling of lag for users to wait for the system font size change. Bug: 279525588 Test: manually - attach the video to the bug Change-Id: I8da85eb9b264f331c4347a87e2107d52872f4274
This commit is contained in:
@@ -107,13 +107,13 @@ class FontScalingDialog(
|
||||
var isTrackingTouch = false
|
||||
|
||||
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
|
||||
// Always provide preview configuration for text first when there is a change
|
||||
// in the seekbar progress.
|
||||
createTextPreview(progress)
|
||||
|
||||
if (!isTrackingTouch) {
|
||||
// The seekbar progress is changed by icon buttons
|
||||
changeFontSize(progress, CHANGE_BY_BUTTON_DELAY_MS)
|
||||
} else {
|
||||
// Provide preview configuration for text instead of changing the system
|
||||
// font scale before users release their finger from the seekbar.
|
||||
createTextPreview(progress)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user