-
Notifications
You must be signed in to change notification settings - Fork 0
fading_bar_explained
##FADING_BAR
###Fading Bar Explained

The image shown above is a composition of the FADING_BAR with various settings.
From left to right the arguments used are:
- fadeFrom: 0.99 fadeTo: 0.00
- fadeFrom: 0.99 fadeTo: 0.10
- fadeFrom: 0.99 fadeTo: 0.20
- fadeFrom: 0.99 fadeTo: 0.40
- fadeFrom: 0.99 fadeTo: 0.80
As you can see all bars start from the outside which is controlled by the fadeFrom argument, and fade into the color it is passing over when nearing the zero line.
The fadeTo argument controls the distance from the centerline where the fading starts, in the first bar this is very close to the zero line. The higher the second argument, the closer to the starting point the fading starts. In the last bar the second argument is almost as high as the first argument, and if you look closely you will see that the fade is ocurring over a very short distance.
This fade distance is caused by the difference between the two arguments, the smaller the difference, the shorter the fade distance will be until it becomes a sharply defined end when both arguments are equal.
However, when both arguments are equal, the bar will start to behave slightly different from its standard mode. As long as both values are equal, the bar will always start on the zero line, extending outwards to the top and bottom border.
Another effect of using equal values is that the seek bar will be identical to the position bar.
Things start to change again when you specify a lower value for the fadeFrom argument than for the fadeTo argument. If the fadeFrom argument is smaller than the fadeTo argument, the bar will still start at the zero line, and the fading goes in the other direction, so towards the top and bottom border.
So, recapping:
- fadeFrom larger than fadeTo: outside to inside for the position bar and inside to outside for the seekbar.
- fadeFrom smaller than fadeTo: inside to outside for the position bar and outside to inside for the seekbar.
- fadeFrom equal to fadeTo: inside to outside for both the position bar and seekbar .
- as long as both fadeFrom and fadeTo are not equal, the seekbar will be the opposite of the position bar.