P Paul Boyle Member Licensed User Longtime User Apr 29, 2015 #1 Hi Is it possible, via code, to add a border to a button when EnabledDrawable = GradientDrawable ? Thanks P
Hi Is it possible, via code, to add a border to a button when EnabledDrawable = GradientDrawable ? Thanks P
Peter Simpson Expert Licensed User Longtime User Apr 29, 2015 #2 Have you seen this post @Paul Boyle https://www.b4x.com/android/forum/threads/fancybutton-v1-0-3.51454/#content, it might help. Upvote 0
Have you seen this post @Paul Boyle https://www.b4x.com/android/forum/threads/fancybutton-v1-0-3.51454/#content, it might help.
P Paul Boyle Member Licensed User Longtime User Apr 30, 2015 #3 Hi Why wont the below work? Item pressed on a ListView: Code: Copy sub lv_Theme_ItemClick (Position as int, Value as object) Select Case Value Case "Light" UpdateTheme(Colors.White) Case "Dark" UpdateTheme(Colors.Black) End Select Called Sub: Code: Copy Sub UpdateTheme(color1 as ColorDrawable) pnl_Home.Background = color1 End Sub Many Thanks P. Upvote 0
Hi Why wont the below work? Item pressed on a ListView: Code: Copy sub lv_Theme_ItemClick (Position as int, Value as object) Select Case Value Case "Light" UpdateTheme(Colors.White) Case "Dark" UpdateTheme(Colors.Black) End Select Called Sub: Code: Copy Sub UpdateTheme(color1 as ColorDrawable) pnl_Home.Background = color1 End Sub Many Thanks P.
eurojam Well-Known Member Licensed User Longtime User Apr 30, 2015 #4 your sub Updatetheme needs a ColorDrawable as parameter, but you are passing a color, so change the argument to a colordrawable: Code: Copy Dim cd As ColorDrawable cd.Initialize(Colors.Green, 5dip) UpdateTheme(cd) Upvote 0
your sub Updatetheme needs a ColorDrawable as parameter, but you are passing a color, so change the argument to a colordrawable: Code: Copy Dim cd As ColorDrawable cd.Initialize(Colors.Green, 5dip) UpdateTheme(cd)