Is there a simple way to change the开发者_开发知识库 bar color of the default download progress bar by extending the DownloadProgressBar component besides implementing our own progress bar?
Since drawProgressBar
method, where progress bar drawing is performed, is private
, you cannot change the colors there. But you can write your own class extending Sprite
and implementing IPreloaderDisplay
and copy all the code from DownloadProgressBar
class. And then just set your own colors in drawProgressBar
method. And don't forget to set your own preloader as a preloader
property of Application
.
Try setting preloaderChromeColor
in the Application tag. If you want more control, you'll need to create a custom preloader which extends SparkDownloadProgressBar and set backgroundColor in there.
精彩评论