I inakigarm Well-Known Member Licensed User Longtime User Jan 28, 2015 #1 Hi: I'd search the forum and found several examples on progress bar estandard, but couldn't find a way to change indeterminate progressbar tint color (not background) I found the way to do it but I don't know how to do code it using reflection or javaobject; if someone can help to code using reflection I hope I 'll learn the way to do it in a future Source: http://stackoverflow.com/questions/2729180/how-to-change-the-color-of-an-indefinite-progressbar?lq=1 Code: Copy progressBar.getIndeterminateDrawable().setColorFilter( getResources().getColor(R.color.light_light_purple), android.graphics.PorterDuff.Mode.SRC_IN); Thanks Last edited: Jan 28, 2015
Hi: I'd search the forum and found several examples on progress bar estandard, but couldn't find a way to change indeterminate progressbar tint color (not background) I found the way to do it but I don't know how to do code it using reflection or javaobject; if someone can help to code using reflection I hope I 'll learn the way to do it in a future Source: http://stackoverflow.com/questions/2729180/how-to-change-the-color-of-an-indefinite-progressbar?lq=1 Code: Copy progressBar.getIndeterminateDrawable().setColorFilter( getResources().getColor(R.color.light_light_purple), android.graphics.PorterDuff.Mode.SRC_IN); Thanks
Erel B4X founder Staff member Licensed User Longtime User Jan 28, 2015 #2 You can use this code: Code: Copy Dim jo As JavaObject = ProgressBar1 jo = jo.RunMethod("getIndeterminateDrawable", Null) jo.RunMethod("setColorFilter", Array (Colors.Red, "SRC_IN")) Upvote 0
You can use this code: Code: Copy Dim jo As JavaObject = ProgressBar1 jo = jo.RunMethod("getIndeterminateDrawable", Null) jo.RunMethod("setColorFilter", Array (Colors.Red, "SRC_IN"))