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.
And if there's a way to have that default sign-in button, how would I also customize it (like size and scope, in java it'd be calling setSize and setScopes like described in the link above)?
Hi,
I have looked at the attached example, but it seems to be using a png file instead of a code-based button. I prefer code based button, if possible, so it can be dynamically customized on runtime (like size and the language on the button).
Sub SignInButton_Click(viewTag As Object)
MsgboxAsync("Click", "")
End Sub
This is the Sub I created:
B4X:
' Event: <code> Sub SignInButton_Click(viewTag as Object) </code>
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
End Sub