Hi, Is there a way with b4a to have the default sign in with google button (the one from com.google.android.gms.common.SignInButton) in an activity? Either as a new button or by transforming an existing button's (like designer script buttons) appearance into one. In java it'd be done like how...
www.b4x.com
But I am not sure how to use the CreateObject2 to pass the SignInButton.ColorScheme to use the COLOR_DARK if someone can help?
Certainly I have problem understanding the java object so I assume I am incorrectly using it - it is not working with the below:
In Activity_Create I have
B4X:
Dim jo As JavaObject = getGoogleSigninButton
jo.RunMethod("setStyle", Array(0, 0)) 'SIZE_STANDARD, COLOR_DARK
Activity.AddView(getGoogleSigninButton, 16dip, 50%y + 16dip, 100%x - 32dip, 80dip)
B4X:
Sub getGoogleSigninButton As View
Dim r As Reflector
Dim obj As Object = r.CreateObject2("com.google.android.gms.common.SignInButton", Array(r.GetContext), Array As String("android.content.Context"))
r.Target = obj
r.SetOnClickListener("SignInButton_Click")
Return obj