在Android的自定义图像替换谷歌加登录按钮 [英] Replace Google Plus login button with custom image in android

查看:188
本文介绍了在Android的自定义图像替换谷歌加登录按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序整合谷歌加登录。结果
我想改变我的登录按钮图像与我的自定义图标。

I'm integrating Google Plus login in my application.
I want to change my login button image with my custom icon.

该怎么做?

推荐答案

其简单,使用来自指引的 Google+登录,则可以使用简单的按钮

Its simple, using guideline from Google+ Sign In, you can use simple Button

<Button
   android:id="@+id/button"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:layout_centerHorizontal="true"
   android:text="@string/common_signin_button_text_long" />

通过设置onClickListener

By setting onClickListener

 if (mGoogleApiClient.isConnected()) {
      Plus.AccountApi.clearDefaultAccount(mGoogleApiClient);
      mGoogleApiClient.disconnect();
      mGoogleApiClient.connect();
    }

这篇关于在Android的自定义图像替换谷歌加登录按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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