I saw several topics regarding ProgressBars color processing, but no one could answer my doubts.
I am using the horizontal ProgressBar Undefined type. I want it to have a transparent background with a colored progressBar, but it cannot find a way to do this.
For a regular ProgressBar (not undefined), I can get LayerDrawable by calling progressBar.getProgressDrawable() . Then, using findDrawableByLayerId(android.R.id.background) , I can only paint the background.
But using progressBar.getIndeterminateDrawable() , it returns to me GradientDrawable , so I can not perform the same procedure.
Is it possible to get colors with GradientDrawable for all API levels? Because, if so, I could get the background color and change it.
Is there any solution for this?
source share