Android Question [Solved] SignInButton COLOR_DARK how to use?

AymanA

Active Member
Licensed User
Hi All,

I have been following this post here and I am using the COLOR_LIGHT I think in this post:


But I am not sure how to use the CreateObject2 to pass the SignInButton.ColorScheme to use the COLOR_DARK if someone can help?


Thank you!
 

AymanA

Active Member
Licensed User
Thank you so much Erel for your 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
 

AymanA

Active Member
Licensed User
Thank you so much for confirming this, will try in phone rather simulator might be the problem, appreciate your help!
 
Top