Android Question color picker set a panel color

Addo

Well-Known Member
Licensed User
Longtime User
i am using this snippest code from @Erel

B4X:
Dim cd As ColorDialog
Dim sf As Object = cd.ShowAsync("Choose Color", "Yes", "Cancel", "No", Null, False)

Wait For (sf) Dialog_Result(Result As Int)
If Result = DialogResponse.POSITIVE Then
panel1.Color = cd.RGB
End If

but the panel color return wrong color
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Tested with this code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("1")
   Dim cd As ColorDialog
   Dim sf As Object = cd.ShowAsync("Choose Color", "Yes", "Cancel", "No", Null, False)

   Wait For (sf) Dialog_Result(Result As Int)
   If Result = DialogResponse.POSITIVE Then
       Activity.Color = cd.RGB
   End If
End Sub
Works properly.
 
Upvote 0
Top