Horizontal Progress Bar Is Not Visible If Placed Above Toolbar (for Android 5)
I tried to place horizontal progress bar on the top of toolbar by having the following XML. my_activity.xml
Solution 1:
On Android 5.0+ devices, elevation is taken into account when determining the z-order of components - those with a higher elevation are visibly above those with a lower elevation, even if the higher elevation item is declared earlier in the XML file (normally causing it to be behind).
You can add an elevation to your ProgressBar
, matching the elevation of the Toolbar
- that will ensure that the same z-ordering works as in previous versions of Android.
Post a Comment for "Horizontal Progress Bar Is Not Visible If Placed Above Toolbar (for Android 5)"