Android Google加“注销"按钮看上去与Google教程文档中的“登录"按钮不同 [英] Android Google plus Sign out button looks different from sign in button in Google tutorial docs

查看:77
本文介绍了Android Google加“注销"按钮看上去与Google教程文档中的“登录"按钮不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在按照Google开发者网站中提到的步骤实施登录并在我的应用中退出.

I am following the steps mentioned in Google developers site to implement sign in and sign out in my app.

添加登录和退出按钮的代码如下:

The code to add the sign-in and sign-out button as mentioned there is:

<!-- sign-in button -->
<com.google.android.gms.common.SignInButton
    android:id="@+id/sign_in_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

<!-- sign-out button -->
<Button
    android:id="@+id/sign_out_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Sign Out"
    android:visibility="gone" />

在上面提到的示例中,退出"按钮看上去与退出"按钮非常不同(奇数).

In the sample mentioned over there, the sign out button looks very different(and odd) from the sign out button.

这是因为退出按钮不是从com.google.android.gms中获取的吗?

Is this because the sign out button is not taken from com.google.android.gms?

com.c1中是否有适当的退出按钮?

Is there a proper sign-out button available in com.google.android.gms?

推荐答案

google没有提供退出按钮.

There is no sign-out button provided by google.

如果您希望使用与Google样式相同的其他按钮,则需要自己创建它们.

If you would like extra buttons in the same style as google's, you will need to create them yourself.

但这比听起来容易得多,Google提供了许多资源,向您展示如何创建外观类似于Google按钮的按钮.在这里看看:

But it's a lot easier than it sounds, there are many resources provided by Google to show you how to create a button that looks just like a Google button. Take a look over here:

https://developers.google.com/+/branding-guidelines

这是我用Microsoft绘画制作的一个小例子,向您展示可以制作的东西!

Here is a little example I made in microsoft paint to show you the kind of stuff you can make!

这篇关于Android Google加“注销"按钮看上去与Google教程文档中的“登录"按钮不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆