S shashkiranr Active Member Licensed User Longtime User Jan 26, 2016 #1 Hi All, I have been trying to style the seekbar. I am facing certain obstacles. first of all I wanted a seekbar with a white progress and red secondary progress. I was able to achieve the white progress by using Code: Copy Dim jo1 As JavaObject = seek jo1 = jo1.RunMethod("getProgressDrawable", Null) jo1.RunMethod("setColorFilter", Array (Colors.White, "SRC_IN")) and to get the secondary progress I tried to style using xml but it didnt have any effect so i used the below code. Code: Copy Dim r As Reflector r.Target = p r.Target = r.RunMethod("getProgressDrawable") r.RunMethod4("setDrawableByLayerId", _ Array As Object(16908303, drawable), _ Array As String("java.lang.int", "android.graphics.drawable.Drawable")) and it worked but the width of the secondary progress is way too much. How can I reduce the size of it equal to the progress. I tried to reduce the size in the designer but It wont match. I have attached the image file. Any suggestions would be really appreciated. Best, SK
Hi All, I have been trying to style the seekbar. I am facing certain obstacles. first of all I wanted a seekbar with a white progress and red secondary progress. I was able to achieve the white progress by using Code: Copy Dim jo1 As JavaObject = seek jo1 = jo1.RunMethod("getProgressDrawable", Null) jo1.RunMethod("setColorFilter", Array (Colors.White, "SRC_IN")) and to get the secondary progress I tried to style using xml but it didnt have any effect so i used the below code. Code: Copy Dim r As Reflector r.Target = p r.Target = r.RunMethod("getProgressDrawable") r.RunMethod4("setDrawableByLayerId", _ Array As Object(16908303, drawable), _ Array As String("java.lang.int", "android.graphics.drawable.Drawable")) and it worked but the width of the secondary progress is way too much. How can I reduce the size of it equal to the progress. I tried to reduce the size in the designer but It wont match. I have attached the image file. Any suggestions would be really appreciated. Best, SK
Johan Schoeman Expert Licensed User Longtime User Jan 26, 2016 #2 Something like this... https://www.b4x.com/android/forum/threads/startpointseekbar.57755/ Upvote 0