KZero Active Member Licensed User Longtime User Jun 6, 2020 #1 Hello, How to add a border to GradientDrawable such as ColorDrawable ? Thanks in advance
Toky Olivier Active Member Licensed User Longtime User Jun 6, 2020 #2 You can use JavaObject and run the method setStroke as used here: https://www.b4x.com/android/forum/threads/strokedemo.58687/#content B4X: 'using javaobject Public Sub setGradientDrawableStroke(gd As GradientDrawable,broderwidth As Int,brodercolor As Int) Dim jo As JavaObject jo=gd jo.RunMethod("setStroke", Array As Object(broderwidth,brodercolor)) End Sub Upvote 0
You can use JavaObject and run the method setStroke as used here: https://www.b4x.com/android/forum/threads/strokedemo.58687/#content B4X: 'using javaobject Public Sub setGradientDrawableStroke(gd As GradientDrawable,broderwidth As Int,brodercolor As Int) Dim jo As JavaObject jo=gd jo.RunMethod("setStroke", Array As Object(broderwidth,brodercolor)) End Sub