authentication - How to add the red color Google+ login button for android? (Not the white color one) -
i'm following https://developers.google.com/identity/sign-in/android/sign-in add google plus login android app.
this documentation recommends following way add red color google plus login button.
googlesigninoptions gso = new googlesigninoptions.builder(googlesigninoptions.default_sign_in) .requestscopes(new scope(scopes.plus_login)) .requestemail() .build(); signinbutton signinbutton = (signinbutton) findviewbyid(r.id.sign_in_button); signinbutton.setsize(signinbutton.size_standard); signinbutton.setscopes(gso.getscopearray());
but problem setscopes method deprecated now. (https://developers.google.com/android/reference/com/google/android/gms/common/signinbutton)
setscopes(scope[] scopes) method deprecated. setting scopes no longer impact branding.
i tried following method also.
mgoogleapiclient = new googleapiclient.builder(this) .enableautomanage(this , this) .addscope(new scope(scopes.plus_login)) .addapi(auth.google_sign_in_api, gso) .build();
but red color google+ button not appearing. how add following button then?
if read plus api deprecation notes, find following note @ end:
with deprecation of google+ people api, changed our branding guidelines. sign-in buttons should branded "google sign in" either blue or white backgrounds.
Comments
Post a Comment